diff --git a/docs/HOOKS.md b/docs/HOOKS.md index c6a5f66d9..ca3292adc 100644 --- a/docs/HOOKS.md +++ b/docs/HOOKS.md @@ -66,7 +66,7 @@ An unnamed hook (`before_perform`) will be executed first. The available hooks are: -* `before _enqueue`: Called with the job args before a job is placed on the queue. +* `before_enqueue`: Called with the job args before a job is placed on the queue. If the hook returns `false`, the job will not be placed on the queue. * `after_enqueue`: Called with the job args after a job is placed on the queue. diff --git a/lib/resque/failure/redis.rb b/lib/resque/failure/redis.rb index 8ebee78c1..3dbbc14dc 100644 --- a/lib/resque/failure/redis.rb +++ b/lib/resque/failure/redis.rb @@ -5,7 +5,7 @@ module Failure class Redis < Base def save data = { - :failed_at => Time.now.strftime("%Y/%m/%d %H:%M:%S"), + :failed_at => Time.now.strftime("%Y/%m/%d %H:%M:%S %Z"), :payload => payload, :exception => exception.class.to_s, :error => exception.to_s, diff --git a/lib/resque/worker.rb b/lib/resque/worker.rb index c4d7021d8..fad6b174f 100644 --- a/lib/resque/worker.rb +++ b/lib/resque/worker.rb @@ -391,7 +391,7 @@ def working_on(job) job.worker = self data = encode \ :queue => job.queue, - :run_at => Time.now.to_s, + :run_at => Time.now.strftime("%Y/%m/%d %H:%M:%S %Z"), :payload => job.payload redis.set("worker:#{self}", data) end