We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 4373b5c commit 13fa261Copy full SHA for 13fa261
lib/resque.rb
@@ -137,6 +137,19 @@ def inline=(inline)
137
138
# Pushes a job onto a queue. Queue name should be a string and the
139
# item should be any JSON-able Ruby object.
140
+ #
141
+ # Resque works generally expect the `item` to be a hash with the following
142
+ # keys:
143
144
+ # class - The String name of the job to run.
145
+ # args - An Array of arguments to pass the job. Usually passed
146
+ # via `class.to_class.perform(*args)`.
147
148
+ # Example
149
150
+ # Resque.push('archive', :class => 'Archive', :args => [ 35, 'tar' ])
151
152
+ # Returns nothing
153
def push(queue, item)
154
watch_queue(queue)
155
redis.rpush "queue:#{queue}", encode(item)
0 commit comments