File tree Expand file tree Collapse file tree 1 file changed +9
-10
lines changed Expand file tree Collapse file tree 1 file changed +9
-10
lines changed Original file line number Diff line number Diff line change @@ -29,16 +29,15 @@ If your job is a coroutine, it will be awaited::
29
29
async def my_task(a, b):
30
30
await asyncio.sleep(3)
31
31
32
- # Tasks being async or not can be awaited asynchronously or not
32
+ With async tasks (such as ``my_task `` above), and with ``concurrency `` set to a value
33
+ greater than ``1 `` in the Procrastinate worker, the worker process may execute multiple
34
+ jobs at the same time. See `./concurrency ` for more information on how to configure
35
+ Procrastinate workers for concurrent jobs.
36
+
37
+ Note that tasks can be deferred asynchronously or synchronously, whether they are async
38
+ or not::
39
+
40
+ # Note: tasks being async or not can be awaited asynchronously or not
33
41
await my_task.defer_async(a=1, b=2)
34
42
# or
35
43
my_task.defer(a=1, b=2)
36
-
37
- As of today, jobs are still executed
38
- sequentially, so if you have 100 asynchronous jobs that each take 1 second doing
39
- asynchronous I/O, you would expect the complete queue to run in little over 1 second,
40
- and instead it will take 100 seconds.
41
-
42
- In the future, you will be able to process asynchronous jobs in parallel (see ticket __).
43
-
44
- __ https://github.com/peopledoc/procrastinate/issues/106
You can’t perform that action at this time.
0 commit comments