DiscordMediaLoader
DiscordMediaLoader copied to clipboard
New job scheduler
To optimize scanning there will be a new implemenation of the jobs and the scheduler. Instead of continously looping all jobs all the time each job will get states:
- idle -> do nothing
- scanning -> scan from latest known message to newest message
- listening -> listening to new messages only
Each job will start in idle after the app has been started or if the job has been added just recently. The scheduler will set them in scanning mode. If they have finished they are set to listening mode until the app is shutting down.