def delayed_push(cls, datetime, item): key = int(time.mktime(datetime.timetuple())) cls.client.rpush('resque:delayed:%s' % key, TaskMessage.encode(item)) cls.client.zadd('resque:delayed_queue_schedule', key, key)
def push(cls, queue, item): cls.watch_queue(queue) cls.client.rpush("resque:queue:%s" % queue, TaskMessage.encode(item))