MCPcopy Create free account
hub / github.com/bbangert/retools / enqueue

Method enqueue

retools/queue.py:361–369  ·  view source on GitHub ↗

Queue this job in Redis

(self)

Source from the content-addressed store, hash-verified

359 return self.serializer(self.to_dict())
360
361 def enqueue(self):
362 """Queue this job in Redis"""
363 full_queue_name = self.queue_name
364 queue_name = full_queue_name.lstrip('retools:queue:')
365 pipeline = self.redis.pipeline()
366 pipeline.rpush(full_queue_name, self.to_json())
367 pipeline.sadd('retools:queues', queue_name)
368 pipeline.execute()
369 return self.job_id
370
371 def run_event(self, event, **kwargs):
372 """Run all registered events for this job"""

Callers 4

wait_for_resultFunction · 0.45
test_enqueue_jobMethod · 0.45

Calls 1

to_jsonMethod · 0.95

Tested by 3

test_enqueue_jobMethod · 0.36