ED_LRR/celery/celery_worker.py

14 lines
371 B
Python

# -*- coding: utf-8 -*-
import time
from celery_test import route
import sys
if len(sys.argv) > 1:
job = route.AsyncResult(sys.argv[1])
if job.ready():
print([job, job.state, len(job.info), len(job.result)])
else:
print([job, job.state, job.info, job.result])
exit(0)
jobs = [route.delay(["Ix", "Colonia"], 48)]
print(jobs)