Skip to content

Commit 3d7212c

Browse files
authored
docs: add missing cli parameters to documentation (#540)
1 parent 845b0a3 commit 3d7212c

File tree

1 file changed

+18
-4
lines changed

1 file changed

+18
-4
lines changed

docs/guide/cli.md

Lines changed: 18 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -93,10 +93,18 @@ pip install "taskiq[reload]"
9393
poetry add taskiq -E reload
9494
```
9595

96+
@tab uv
97+
98+
```bash:no-line-numbers
99+
uv add taskiq[reload]
100+
```
101+
96102
:::
97103

98104
To enable this option simply pass the `--reload` or `-r` option to worker taskiq CLI.
99105

106+
You can set `--reload-dir` to specify directory to watch for changes. It can be specified multiple times if you need to watch multiple directories.
107+
100108
Also this option supports `.gitignore` files. If you have such file in your directory, it won't reload worker
101109
when you modify ignored files. To disable this functionality pass `--do-not-use-gitignore` option.
102110

@@ -124,17 +132,21 @@ The number of signals before a hard kill can be configured with the `--hardkill-
124132

125133
### Other parameters
126134

135+
* `--app-dir` - Path to application directory. This path will be used to import tasks modules. If not specified, current working directory will be used.
136+
* `--workers` - Number of worker child processes (default: 2).
127137
* `--no-configure-logging` - disables default logging configuration for workers.
128-
- `--log-level` is used to set a log level (default `INFO`).
138+
* `--log-level` is used to set a log level (default `INFO`).
139+
* `--log-format` is used to set a log format (default `%(asctime)s][%(name)s][%(levelname)-7s][%(processName)s] %(message)s`).
129140
* `--max-async-tasks` - maximum number of simultaneously running async tasks.
130141
* `--max-prefetch` - number of tasks to be prefetched before execution. (Useful for systems with high message rates, but brokers should support acknowledgements).
131142
* `--max-threadpool-threads` - number of threads for sync function execution.
132143
* `--no-propagate-errors` - if this parameter is enabled, exceptions won't be thrown in generator dependencies.
133144
* `--receiver` - python path to custom receiver class.
134145
* `--receiver_arg` - custom args for receiver.
135146
* `--ack-type` - Type of acknowledgement. This parameter is used to set when to acknowledge the task. Possible values are `when_received`, `when_executed`, `when_saved`. Default is `when_saved`.
136-
* `max-tasks-per-child` - maximum number of tasks to be executed by a single worker process before restart.
137-
* `--shutdown-timeout` - maximum amount of time for graceful broker's shutdown in seconds.
147+
* `--max-tasks-per-child` - maximum number of tasks to be executed by a single worker process before restart.
148+
* `--max-fails` - Maximum number of child process exits.
149+
* `--shutdown-timeout` - maximum amount of time for graceful broker's shutdown in seconds (default 5).
138150
* `--wait-tasks-timeout` - if cannot read new messages from the broker or maximum number of tasks is reached, worker will wait for all current tasks to finish. This parameter sets the maximum amount of time to wait until shutdown.
139151
* `--hardkill-count` - Number of termination signals to the main process before performing a hardkill.
140152

@@ -150,17 +162,19 @@ taskiq scheduler <path to scheduler> [optional module to import]...
150162

151163
For example
152164

153-
```python
165+
```bash
154166
taskiq scheduler my_project.broker:scheduler my_project.module1 my_project.module2
155167
```
156168

157169
### Parameters
158170

159171
Path to scheduler is the only required argument.
160172

173+
- `--app-dir` - Path to application directory. This path will be used to import tasks modules. If not specified, current working directory will be used.
161174
- `--tasks-pattern` or `-tp`.
162175
It's a glob pattern of files to import. By default it is `**/tasks.py` which searches for all `tasks.py` files. May be specified multiple times.
163176
- `--fs-discover` or `-fsd`. This option enables search of task files in current directory recursively, using the given pattern.
164177
- `--no-configure-logging` - use this parameter if your application configures custom logging.
165178
- `--log-level` is used to set a log level (default `INFO`).
166179
- `--skip-first-run` - skip first run of scheduler. This option skips running tasks immediately after scheduler start.
180+
- `--update-interval` - interval in seconds to check for new tasks. By default scheduler will check for new scheduled tasks every first second of the minute.

0 commit comments

Comments
 (0)