Skip to content

Commit 167dc8d

Browse files
committed
add a dequeue example
1 parent ca5b657 commit 167dc8d

File tree

1 file changed

+10
-1
lines changed

1 file changed

+10
-1
lines changed

lib/resque.rb

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -153,7 +153,16 @@ def enqueue(klass, *args)
153153
# If no queue can be inferred this method will raise a `Resque::NoQueueError`
154154
#
155155
# If no args are given, this method will dequeue *all* jobs matching
156-
# the provided class. See `Resque::Job.destroy` for more information.
156+
# the provided class. See `Resque::Job.destroy` for more
157+
# information.
158+
#
159+
# Example:
160+
#
161+
# # Removes all jobs of class `UpdateNetworkGraph`
162+
# Resque.dequeue(GitHub::Jobs::UpdateNetworkGraph)
163+
#
164+
# # Removes all jobs of class `UpdateNetworkGraph` with matching args.
165+
# Resque.dequeue(GitHub::Jobs::UpdateNetworkGraph, 'repo:135325')
157166
#
158167
# This method is considered part of the `stable` API.
159168
def dequeue(klass, *args)

0 commit comments

Comments
 (0)