[JobQueue] Added support for delayed jobs with JobQueueRedis.
authorAaron Schulz <aschulz@wikimedia.org>
Tue, 12 Mar 2013 03:40:01 +0000 (20:40 -0700)
committerGerrit Code Review <gerrit@wikimedia.org>
Thu, 21 Mar 2013 07:24:40 +0000 (07:24 +0000)
commitb1aa60af41706dcd131eda7b72765872bb323f3e
treee2d8901855f9e143589880d68c08640085da1dc8
parent27a0f89f6cd86e19123c8bdeeaf4d565f64e4cf0
[JobQueue] Added support for delayed jobs with JobQueueRedis.

* The queue can handle delaying jobs until a given timestamp is reached.
* Added Job::getReleaseTimestamp() to let jobs specifiy delay amounts.
* Added a "checkDelay" option and a supportsDelayedJobs() function to JobQueue.
  There are also getDelayedCount() and getAllDelayedJobs() functions.
* Simplified a bit of code in doBatchPush() and pushBlobs().
* Improved the logic in redisEval().

Change-Id: I40b3e3438e659f6844bdbdd5e9d3ccc6c4dc82b2
includes/job/Job.php
includes/job/JobQueue.php
includes/job/JobQueueRedis.php