Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- from celery.decorators import task
- from django.core.cache import cache
- @task
- def do_job(path):
- "Performs an operation on a file"
- # ... Code to perform the operation ...
- cache.set(current_task_id, operation_results)
- @task
- def do_job(path, task_id=None):
- cache.set(task_id, operation_results)
- @task
- def do_job(path):
- cache.set(do_job.request.id, operation_results)
- @task(bind=True)
- def do_job(self, path):
- cache.set(self.request.id, operation_results)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement