Wednesday, July 28, 2010

The Bong Loader

BongLoader.exe is a console application written in C#. I have developed and tested it on my windows system, but thanks to Mono it runs without any changes on my Linux Box. (DS209). 


What does it do:
  • it is executed via cron-job every 10 minutes.
  • read settings from config file (BongLoader.exe.config)
  • it checks if allready another instance of the applications is running. In this case the applications exits. (I don't want parallel downloads to minimize load on the NAS box).
  • It asks the database for the next waiting item.
  • If there is one it downloads the file from the Bong.TV server (http-get).
  • during the downloads the progress field in the database is updated (and also the FinishDate).
  • if the download was successfull the status is set to 'Finished'
  • if there was an error during the download, Status is set to 'Failed' and the error(text) is written into ErrorText-field.
  • the application writes to a log-file
  • applications exits

1 comment:

  1. Hallo,
    an dieser Stelle erstmal ein fettes Dankeschön für das geniale Projekt. Ist es möglich, die BongLoader.exe.config beispielhaft (so wie bei der BongParser.exe.config) online zu stellen. Ich habe versucht, diese aus der Kopie der BongParser.exe.config zu erstellen, leider scheitert das Ganze aber.

    Gruß swotch

    ReplyDelete