I am testing celery in a local environment. My Python file has the following two lines of code:
celery_app.send_task('tasks.test1', args=[self.id], kwargs={})
celery_app.send_task('tasks.test2', args=[self.id], kwargs={})
Looking at the console output, they seem to be executed sequentially one after another. But test2 only works after test1 completes. At least that's what reading console output looks like.
These tasks have no dependencies on each other , so I do not want one task to wait for the completion of another before moving on to the next line.
How can I complete both tasks at the same time?
---- **** -----
--- * *** * -- Darwin-14.0.0-x86_64-i386-64bit
-- * - **** ---
- ** ---------- [config]
- ** ---------- .> app: tasks:0x104cd8c10
- ** ---------- .> transport: sqs://123
- ** ---------- .> results: disabled
- *** --- * --- .> concurrency: 4 (prefork)
-- ******* ----
--- ***** ----- [queues]
-------------- .> celery exchange=celery(direct) key=celery
source
share