Move Schedules to from DB to Queue Datatype
What does this MR do and why?
This moves scheduled tasks from being dispatched in the DB to being dispatched by a FIFO queue datatype instead. While affording users better performance overall this should also be a mitigation factor in issue #64 (closed) .
Let's outline this: Currently when scheduled tasks are queued to go out the door we add them to the commands table in the database. We then monitor the table and look for commands that have not been actioned. So think of it this way...if a user has 3 tasks - one root task then 2 reactions that user will have the two reactions dispatch at the same time...theoretically they will have both those tasks try to write commands to the DB concurrently for queue to be deployed. This will very likely cause a concurrency lock and crash our system. The two reaction tasks would both be trying to get a lock on the database at the same exact time. This is sort of silly that we'd be causing this issue just to artificially create a queue through sqlite when python already has a queue datatype built in.
MR acceptance checklist
This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.
-
Have you checked this doesn't interfere/conflict/duplicate someone elses work? -
Have you fully tested your changes? -
Have you resolved any lint issues? -
Have you assigned a reviewer? -
Have you applied correct labels?