I am using Resque to enqueue jobs.
I start a worker and the jobs are processed.
My jobs extend a gem that implements job hooks like before_enqueue, after_enqueue, before_perform, after_perform and sends stuff to statsd. Those work. However, before_dequeue and after_dequeue do not seem to be called. Is there a reason why?
Also, my understanding of Resque isn't all quite there. I would call Resque.enqueue to queue up a job class, and then if I start a Resque worker, it will automatically pop a task from the queue and then perform the task. Where does dequeue come into play? I notice that dequeue destroys the the task, when does the dequeue step happen in the Resque worker workflow?
I want to hook into after_dequeue because I want to log the time that a task stays in the queue, so I need to hook into before_enqueue and after_dequeue.