You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/guide/cli.md
+18-4Lines changed: 18 additions & 4 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -93,10 +93,18 @@ pip install "taskiq[reload]"
93
93
poetry add taskiq -E reload
94
94
```
95
95
96
+
@tab uv
97
+
98
+
```bash:no-line-numbers
99
+
uv add taskiq[reload]
100
+
```
101
+
96
102
:::
97
103
98
104
To enable this option simply pass the `--reload` or `-r` option to worker taskiq CLI.
99
105
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
+
100
108
Also this option supports `.gitignore` files. If you have such file in your directory, it won't reload worker
101
109
when you modify ignored files. To disable this functionality pass `--do-not-use-gitignore` option.
102
110
@@ -124,17 +132,21 @@ The number of signals before a hard kill can be configured with the `--hardkill-
124
132
125
133
### Other parameters
126
134
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).
127
137
*`--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`).
129
140
*`--max-async-tasks` - maximum number of simultaneously running async tasks.
130
141
*`--max-prefetch` - number of tasks to be prefetched before execution. (Useful for systems with high message rates, but brokers should support acknowledgements).
131
142
*`--max-threadpool-threads` - number of threads for sync function execution.
132
143
*`--no-propagate-errors` - if this parameter is enabled, exceptions won't be thrown in generator dependencies.
133
144
*`--receiver` - python path to custom receiver class.
134
145
*`--receiver_arg` - custom args for receiver.
135
146
*`--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).
138
150
*`--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.
139
151
*`--hardkill-count` - Number of termination signals to the main process before performing a hardkill.
140
152
@@ -150,17 +162,19 @@ taskiq scheduler <path to scheduler> [optional module to import]...
-`--app-dir` - Path to application directory. This path will be used to import tasks modules. If not specified, current working directory will be used.
161
174
-`--tasks-pattern` or `-tp`.
162
175
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.
163
176
-`--fs-discover` or `-fsd`. This option enables search of task files in current directory recursively, using the given pattern.
164
177
-`--no-configure-logging` - use this parameter if your application configures custom logging.
165
178
-`--log-level` is used to set a log level (default `INFO`).
166
179
-`--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