Flexget/Flexget — pull request #309 by gazpachoking (2014-08-13 23:21:24+00:00)
Title: Move task execution to manager

This pull refactors several different things:
- The `Job` class has been removed, and the important information it retained was moved directly to the `Task` class
- `Task`s have been changed to their own output redirection. Set `output` property to a filelike and it will capture all task output (used to send specific task output via ipc, or to webui)
- `Task`s have been changed to handle changing the logging verbosity to their own setting. Previously the caller of `task.execute` was responsible
- The main queue of tasks to be run has been moved to `Manager` from the scheduler. The manager thread is also responsible for executing the tasks in the queue now. This simplifies things, as we don't have to signal other threads to shutdown, they can all be declared as daemons, and will be killed when the main thread (now manager executing tasks from the queue) ends
- The scheduler is now just a daemon thread which checks whether any schedules are due and tells the manager to execute them (we could now further optimize this thread to sleep until the next trigger is due instead of having a faster loop.)