…urelabs/resque-status into signaturelabs-status_codes_as_constants Conflicts: lib/resque/plugins/status/hash.rb
Removes `extend Resque::Helpers`, adds compatibility shims.
Change Hash.statuses to use mget, reducing the number of redis queries
The existing implementation makes n+1 queries to redis, this reduces it to two queries. Overall time complexity is unchanged, but overhead is significantly reduced.
After looking at the code in Resque itself for inline, it should just work without any changes in Resque::Status. If you're using inline with the idea that you'll be able to mock out redis, though, this will not work as even with `inline` Resque::Status will still depend on Redis to work. You can get around this with using a mock redis library like: https://github.com/causes/mock_redis
Raises NotANumber error if you try to pass a string or anything else to at()
Add dequeue method.
When using Resque.inline, for acceptance tests, jobs with status will run inline, as if Resque.enqueue was synchronous. When the job finishes Resque::Plugins::Status.enqueue will create a new hash overriding the one that was used within the job (when calling #at, for example). This will make the job status be reset to 'queued', though it has just completed. By moving Resque::Plugins::Status::Hash.create before the Resque.enqueue, we make the status available to the job as usual, and we don't override the status set by the job. If Resque.enqueue fails we remove the created hash, thus ensuring that we won't leave an unused hash. When Resque.inline is not used it works as usual.
fixing a typo, completed works for me but complete does not. Looking...
Hash#mget to retrieve multiple statuses at once
Add button to clear only failed statuses to server plugin
Fix the "NaN days ago" for "Last Updated" in /statuses page