Skip to content

Commit 78d0f68

Browse files
committed
Docs update.
Signed-off-by: Pavel Kirilin <[email protected]>
1 parent 8789d9c commit 78d0f68

File tree

8 files changed

+1924
-1905
lines changed

8 files changed

+1924
-1905
lines changed

docs/available-components/brokers.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ It's suitable for small projects with only ONE worker process, because of the ZM
2020
It publishes messages on the local port. All worker processes are reading messages from this port.
2121
If you run many worker processes, all tasks will be executed `N` times, where `N` is the total number of worker processes.
2222

23-
::: danger Be careful!
23+
::: caution Be careful!
2424
If you choose this type of broker, please run taskiq with `-w 1` parameter,
2525
otherwise you may encounter undefined behavior.
2626
:::

docs/extending-taskiq/result-backend.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,6 @@ It's a good practice to skip fetching logs from the storage unless `with_logs=Tr
1616
:::
1717

1818

19-
::: danger Important note!
19+
::: caution Important note!
2020
`with_logs` param is now deprecated. It will be removed in future releases.
2121
:::

docs/guide/architecture-overview.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ If you use dark theme and cannot see words on diagram,
1515
try switching to light theme and back to dark.
1616
:::
1717

18-
```sequence
18+
```mermaid
1919
rect rgb(191, 223, 255)
2020
note right of Your code: Client side.
2121
Your code ->> Kicker: assemble message

docs/guide/cli.md

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,19 @@ We have two options for this:
2929
It's a name of files to import. By default is searches for all `tasks.py` files.
3030
- `--fs-discover` or `-fsd`. This option enables search of task files in current directory recursively, using the given pattern.
3131

32+
### Acknowledgements
33+
34+
The taskiq supports three types of acknowledgements:
35+
* `when_received` - task is acknowledged when it is **received** by the worker.
36+
* `when_executed` - task is acknowledged right after it is **executed** by the worker.
37+
* `when_saved` - task is acknowledged when the result of execution is saved in the result backend.
38+
39+
This can be configured using `--ack-type` parameter. For example:
40+
41+
```bash
42+
taskiq worker --ack-type when_executed mybroker:broker
43+
```
44+
3245
### Type casts
3346

3447
One of features taskiq have is automatic type casts. For example you have a type-hinted task like this:
@@ -80,6 +93,7 @@ when you modify ignored files. To disable this functionality pass `--do-not-use-
8093
* `--no-propagate-errors` - if this parameter is enabled, exceptions won't be thrown in generator dependencies.
8194
* `--receiver` - python path to custom receiver class.
8295
* `--receiver_arg` - custom args for receiver.
96+
* `--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`.
8397

8498
## Scheduler
8599

docs/guide/getting-started.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ We highly recommend [taskiq-aio-pika](https://pypi.org/project/taskiq-aio-pika/)
3737

3838
Now you need to create a python module with broker declaration. It's just a plain python file with the variable of your broker. For this particular example, I'm going to use the `InMemoryBroker`.
3939

40-
::: danger Important note
40+
::: caution Important note
4141
The InMemoryBroker doesn't send any data over the network,
4242
and you cannot use this broker in
4343
a real-world scenario, but it's still useful for
@@ -244,7 +244,7 @@ await my_task.kicker().with_labels(timeout=0.3).kiq()
244244

245245
:::
246246

247-
::: danger Cool alert
247+
::: caution Cool alert
248248

249249
We use [run_in_executor](https://docs.python.org/3/library/asyncio-eventloop.html#asyncio.loop.run_in_executor) method to run sync functions. Timeouts will raise a TimeoutException, but
250250
synchronous function may not stop from execution. This is a constraint of python.

docs/guide/scheduling-tasks.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ Now we need to start our scheduler with the `taskiq scheduler` command. Like thi
3535
taskiq scheduler module:scheduler
3636
```
3737

38-
::: danger Be careful!
38+
::: caution Be careful!
3939

4040
Please always run only one instance of the scheduler!
4141
If you run more than one scheduler at a time, please be careful since

package.json

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -11,10 +11,11 @@
1111
},
1212
"packageManager": "[email protected]",
1313
"devDependencies": {
14-
"@vuepress/client": "2.0.0-beta.67",
15-
"vue": "^3.3.4",
16-
"vuepress": "2.0.0-beta.67",
17-
"vuepress-plugin-search-pro": "2.0.0-beta.237",
18-
"vuepress-theme-hope": "2.0.0-beta.237"
14+
"@vuepress/client": "2.0.0-rc.0",
15+
"mermaid": "^10.6.1",
16+
"vue": "^3.3.9",
17+
"vuepress": "2.0.0-rc.0",
18+
"vuepress-plugin-search-pro": "2.0.0-rc.1",
19+
"vuepress-theme-hope": "2.0.0-rc.1"
1920
}
2021
}

0 commit comments

Comments
 (0)