GetDotaStats / site

The GetDotaStats site in all of its glory
http://getdotastats.com
MIT License
7 stars 2 forks source link

Cron task queue system #244

Closed jimmydorry closed 8 years ago

jimmydorry commented 8 years ago

Only becomes more important when expected task execution times become more likely to overlap.

We can probably re-purpose the service log for this task queue, and update the existing queries for it. We would also be able to run the longer running queries more often and make a worker pool that doesn't duplicate work.


taskID, taskType, taskPriority, taskState, taskBlocking, dateQueued

taskTypeID, taskName (idle, assigned, running, completed)

stateID, stateName

SELECT * FROM tasksCron WHERE taskState IN (1,2,3) ORDER BY taskPriority DESC, dateQueued ASC LIMIT 0,5

jimmydorry commented 8 years ago

Done