Skip to content

Commit

Permalink
Docs update.
Browse files Browse the repository at this point in the history
Signed-off-by: Pavel Kirilin <[email protected]>
  • Loading branch information
s3rius committed Nov 30, 2023
1 parent 8789d9c commit 78d0f68
Show file tree
Hide file tree
Showing 8 changed files with 1,924 additions and 1,905 deletions.
2 changes: 1 addition & 1 deletion docs/available-components/brokers.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ It's suitable for small projects with only ONE worker process, because of the ZM
It publishes messages on the local port. All worker processes are reading messages from this port.
If you run many worker processes, all tasks will be executed `N` times, where `N` is the total number of worker processes.

::: danger Be careful!
::: caution Be careful!
If you choose this type of broker, please run taskiq with `-w 1` parameter,
otherwise you may encounter undefined behavior.
:::
Expand Down
2 changes: 1 addition & 1 deletion docs/extending-taskiq/result-backend.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,6 @@ It's a good practice to skip fetching logs from the storage unless `with_logs=Tr
:::


::: danger Important note!
::: caution Important note!
`with_logs` param is now deprecated. It will be removed in future releases.
:::
2 changes: 1 addition & 1 deletion docs/guide/architecture-overview.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ If you use dark theme and cannot see words on diagram,
try switching to light theme and back to dark.
:::

```sequence
```mermaid
rect rgb(191, 223, 255)
note right of Your code: Client side.
Your code ->> Kicker: assemble message
Expand Down
14 changes: 14 additions & 0 deletions docs/guide/cli.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,19 @@ We have two options for this:
It's a name of files to import. By default is searches for all `tasks.py` files.
- `--fs-discover` or `-fsd`. This option enables search of task files in current directory recursively, using the given pattern.

### Acknowledgements

The taskiq supports three types of acknowledgements:
* `when_received` - task is acknowledged when it is **received** by the worker.
* `when_executed` - task is acknowledged right after it is **executed** by the worker.
* `when_saved` - task is acknowledged when the result of execution is saved in the result backend.

This can be configured using `--ack-type` parameter. For example:

```bash
taskiq worker --ack-type when_executed mybroker:broker
```

### Type casts

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

## Scheduler

Expand Down
4 changes: 2 additions & 2 deletions docs/guide/getting-started.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ We highly recommend [taskiq-aio-pika](https://pypi.org/project/taskiq-aio-pika/)

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`.

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

:::

::: danger Cool alert
::: caution Cool alert

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
synchronous function may not stop from execution. This is a constraint of python.
Expand Down
2 changes: 1 addition & 1 deletion docs/guide/scheduling-tasks.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ Now we need to start our scheduler with the `taskiq scheduler` command. Like thi
taskiq scheduler module:scheduler
```

::: danger Be careful!
::: caution Be careful!

Please always run only one instance of the scheduler!
If you run more than one scheduler at a time, please be careful since
Expand Down
11 changes: 6 additions & 5 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,11 @@
},
"packageManager": "[email protected]",
"devDependencies": {
"@vuepress/client": "2.0.0-beta.67",
"vue": "^3.3.4",
"vuepress": "2.0.0-beta.67",
"vuepress-plugin-search-pro": "2.0.0-beta.237",
"vuepress-theme-hope": "2.0.0-beta.237"
"@vuepress/client": "2.0.0-rc.0",
"mermaid": "^10.6.1",
"vue": "^3.3.9",
"vuepress": "2.0.0-rc.0",
"vuepress-plugin-search-pro": "2.0.0-rc.1",
"vuepress-theme-hope": "2.0.0-rc.1"
}
}
Loading

0 comments on commit 78d0f68

Please sign in to comment.