lib/resque.rb
def push(queue, item)
    with_retries do
      redis.pipelined do
        redis.sadd(:queues, queue.to_s)
        redis.rpush "queue:#{queue}", encode(item)
      end
    end
  end
# Pushes a job onto a queue. Queue name should be a string and the
# item should be any JSON-able Ruby object.
#
# Resque works generally expect the `item` to be a hash with the following
# keys:
#
#   class - The String name of the job to run.
#    args - An Array of arguments to pass the job. Usually passed
#           via `class.to_class.perform(*args)`.
#
# Example
#
#   Resque.push('archive', :class => 'Archive', :args => [ 35, 'tar' ])
#
# Returns nothing
Pushes a job onto a queue. Queue name should be a string and the
item should be any JSON-able Ruby object.

Resque works generally expect the `item` to be a hash with the following
keys.

The String name of the job to run.
args - An Array of arguments to pass the job.

Example



Returns nothing
Pushes a job onto a queue . Queue name should be a string and the item should be any JSON - able Ruby object . Resque works generally expect the ` item ` to be a hash with the following keys . The String name of the job to run . args - An Array of arguments to pass the job . Example Returns nothing
def push(queue, item)
    with_retries do
      redis.pipelined do
        redis.sadd(:queues, queue.to_s)
        redis.rpush "queue:#{queue}", encode(item)
      end
    end
  end
def push ( queue , item ) with_retries do redis . pipelined do redis . sadd ( :queues , queue . to_s ) redis . rpush "queue:#{queue}" , encode ( item ) end end end
Pushes a job onto a queue.
Pushes a job onto a queue .
queue
item