diff --git a/README.md b/README.md index e5a4831..604096a 100644 --- a/README.md +++ b/README.md @@ -77,7 +77,7 @@ class WorkerSettings: container = Container(groups=[AppGroup]) setup_di(WorkerSettings, container) -container.validate() # optional fail-fast; must come after setup_di registers its providers +container.validate() # optional fail-fast check of the provider graph ``` Run the worker as usual (`arq mymodule.WorkerSettings`) and enqueue jobs with only their real arguments, as in `await pool.enqueue_job("greet", "world")`. The `FromDI` parameters are resolved for you. A task must declare arq's `ctx` dict as its first parameter; injection is order-insensitive otherwise. arq's `ctx` is a plain `dict` (not a dedicated message type), so no context provider is registered. Read job metadata from `ctx`, and `fetch_di_container(ctx)` returns the root container.