From 17ad7f8ec9e9a2a574148385e4ea1bf6d9c6314f Mon Sep 17 00:00:00 2001 From: humancopy Date: Fri, 23 Sep 2011 09:38:17 +0200 Subject: [PATCH] Docs for before & after dequeue hooks. --- docs/HOOKS.md | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/docs/HOOKS.md b/docs/HOOKS.md index ca3292adc..3c1bd9e8e 100644 --- a/docs/HOOKS.md +++ b/docs/HOOKS.md @@ -72,6 +72,12 @@ The available hooks are: * `after_enqueue`: Called with the job args after a job is placed on the queue. Any exception raised propagates up to the code which queued the job. +* `before_dequeue`: Called with the job args before a job is removed from the queue. + If the hook returns `false`, the job will not be removed from the queue. + +* `after_dequeue`: Called with the job args after a job was removed from the queue. + Any exception raised propagates up to the code which dequeued the job. + * `before_perform`: Called with the job args before perform. If it raises `Resque::Job::DontPerform`, the job is aborted. If other exceptions are raised, they will be propagated up the the `Resque::Failure`