Commit Graph

2 Commits

Author SHA1 Message Date
Brian Palmer 8e9bf96d18 spec and migration cleanup for delayed jobs
Fixes up some abstraction so that we can add other jobs backends and
specs, migrations, etc will work as expected.

Also remove some unused parameters from the Delayed::Job methods for
finding and locking jobs.

test plan: run the database migrations on a new db, and migrations
should work without error. delayed jobs should also be created and
processed by workers without error.

Change-Id: I1fe6ef5464f9780db3010fa002703fc030832f8d
Reviewed-on: https://gerrit.instructure.com/11590
Reviewed-by: Cody Cutrer <cody@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Bracken Mosbacker <bracken@instructure.com>
2012-06-28 14:59:36 -06:00
Brian Palmer b7bd537fb0 optimize delayed jobs table indexes, closes #4736
I also removed the "unlock this job if locked_by = worker_name" logic,
since we don't support persistent worker names anyway, so all it
accomplished was slowing down the query.

Change-Id: Ic24ad0903d2d1343e26716cf99efdd3d79ccf2bd
Reviewed-on: https://gerrit.instructure.com/3967
Reviewed-by: Zach Wily <zach@instructure.com>
Tested-by: Hudson <hudson@instructure.com>
2011-06-01 10:32:57 -06:00