Skip to content

Commit 1461c90

Browse files
committed
Merge branch 'release/0.1.5'
2 parents fdbece3 + 18dbb54 commit 1461c90

21 files changed

+5852
-4962
lines changed

.github/workflows/release.yml

Lines changed: 20 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -9,26 +9,37 @@ jobs:
99
deploy_docs:
1010
runs-on: ubuntu-latest
1111
steps:
12-
- uses: actions/checkout@v2
13-
- name: Install dependencies
14-
uses: borales/[email protected]
12+
- uses: actions/checkout@v3
13+
14+
- name: Install pnpm
15+
uses: pnpm/action-setup@v2
1516
with:
16-
cmd: install # will run `yarn install` command
17-
- name: Build docs
18-
uses: borales/[email protected]
17+
version: 7
18+
run_install: true
19+
20+
- name: Setup Node.js
21+
uses: actions/setup-node@v3
1922
with:
20-
cmd: docs:build -d docs_dist # will run `docs:build -d docs_dist` command
23+
node-version: 18
24+
cache: pnpm
25+
26+
- name: Build docs
27+
run: |-
28+
pnpm docs:build
29+
2130
- name: Setup git
2231
run: |
2332
git config --global lfs.allowincompletepush true
33+
2434
- name: Deploy
2535
uses: peaceiris/actions-gh-pages@v3
2636
with:
2737
personal_token: ${{ secrets.PERSONAL_TOKEN }}
2838
external_repository: taskiq-python/taskiq-python.github.io
2939
publish_dir: ./docs_dist
30-
user_name: 'github-actions[bot]'
31-
user_email: 'github-actions[bot]@users.noreply.github.com'
40+
user_name: "github-actions[bot]"
41+
user_email: "github-actions[bot]@users.noreply.github.com"
42+
3243
deploy:
3344
runs-on: ubuntu-latest
3445
steps:

docs/.vuepress/config.ts

Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
import { defineUserConfig } from "vuepress";
2+
import { searchProPlugin } from "vuepress-plugin-search-pro";
3+
import { hopeTheme } from "vuepress-theme-hope";
4+
5+
export default defineUserConfig({
6+
lang: "en-US",
7+
title: "Taskiq",
8+
description: "Distributed task queue with full async support",
9+
head: [
10+
[
11+
"meta",
12+
{
13+
property: "og:image",
14+
content: "https://taskiq-python.github.io/logo.svg",
15+
},
16+
],
17+
],
18+
19+
theme: hopeTheme({
20+
hostname: "https://taskiq-python.github.io",
21+
logo: "/logo.svg",
22+
23+
repo: "taskiq-python/taskiq",
24+
docsBranch: "master",
25+
docsDir: "docs",
26+
27+
navbarAutoHide: "none",
28+
sidebar: "structure",
29+
30+
pure: true,
31+
backToTop: false,
32+
33+
plugins: {
34+
copyCode: {
35+
showInMobile: true,
36+
},
37+
38+
mdEnhance: {
39+
tabs: true,
40+
mermaid: true,
41+
},
42+
43+
sitemap: {
44+
changefreq: "daily",
45+
sitemapFilename: "sitemap.xml",
46+
},
47+
},
48+
}),
49+
50+
plugins: [searchProPlugin({ indexContent: true })],
51+
});

docs/available-components/README.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
---
22
order: 1
33
dir:
4-
order: 3
4+
order: 3
55
---
66

77
# Available components
88

99
In this section, you can find a list of officially supported plugins for the taskiq.
1010

11-
* [Available brokers](./brokers.md)
12-
* [Available result backends](./result-backends.md)
13-
* [Available schedule sources](./scheduler-sources.md)
11+
- [Available brokers](./brokers.md)
12+
- [Available result backends](./result-backends.md)
13+
- [Available schedule sources](./schedule-sources.md)

docs/available-components/brokers.md

Lines changed: 12 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -10,37 +10,38 @@ In this section we'll list officially supported brokers.
1010

1111
This is a special broker for local development. It uses the same functions to execute tasks,
1212
but all tasks are executed locally in the current thread.
13-
By default it uses `InMemoryResultBackend` but this can be overiden.
14-
13+
By default it uses `InMemoryResultBackend` but this can be overriden.
1514

1615
## ZeroMQBroker
1716

18-
This broker uses [ZMQ](https://zeromq.org/) to comunicate between worker and client processes.
17+
This broker uses [ZMQ](https://zeromq.org/) to communicate between worker and client processes.
1918
It's suitable for small projects with only ONE worker process, because of the ZMQ architecture.
2019

2120
It publishes messages on the local port. All worker processes are reading messages from this port.
2221
If you run many worker processes, all tasks will be executed `N` times, where `N` is the total number of worker processes.
2322

2423
::: danger Be careful!
2524
If you choose this type of broker, please run taskiq with `-w 1` parameter,
26-
otherwise you may encounter undefined behaviour.
25+
otherwise you may encounter undefined behavior.
2726
:::
2827

29-
3028
To run this broker please install the [pyzmq](https://pypi.org/project/pyzmq/) lib. Or you can taskiq with `zmq` extra.
3129

3230
::: tabs
3331

3432
@tab Only PyZMQ
33+
3534
```bash
3635
pip install pyzmq
3736
```
37+
3838
@tab Taskiq with ZMQ
39+
3940
```bash
4041
pip install "taskiq[zmq]"
4142
```
42-
:::
4343

44+
:::
4445

4546
## Async shared broker and shared tasks
4647

@@ -56,26 +57,28 @@ def my_task() -> bool:
5657
```
5758

5859
To kiq this task you have to options:
59-
* Explicitly define broker using kicker for this kiq;
60-
* Add default broker for all shared tasks.
60+
61+
- Explicitly define broker using kicker for this kiq;
62+
- Add default broker for all shared tasks.
6163

6264
::: tabs
6365

6466
@tab Defining default broker
67+
6568
```python
6669
from taskiq.brokers.shared_broker import async_shared_broker
6770

6871
async_shared_broker.default_broker(broker)
6972
```
7073

7174
@tab using kicker
75+
7276
```python
7377
await my_task.kicker().with_broker(broker).kiq()
7478
```
7579

7680
:::
7781

78-
7982
## AioPikaBroker (for RabbitMQ)
8083

8184
This broker is not part of the core taskiq lib. You can install it as a separate package [taskiq-aio-pika](https://pypi.org/project/taskiq-aio-pika/).
@@ -86,7 +89,6 @@ pip install taskiq-aio-pika
8689

8790
You can read more about parameters and abilities of this broker in [README.md](https://github.com/taskiq-python/taskiq-aio-pika).
8891

89-
9092
## Redis broker
9193

9294
This broker is not part of the core taskiq lib. You can install it as a separate package [taskiq-redis](https://pypi.org/project/taskiq-redis/).

docs/available-components/result-backends.md

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,10 @@ order: 3
66

77
Result backends are used to store execution results.
88
This includes:
9-
* Captured logs;
10-
* return value;
11-
* Execution time in seconds.
129

10+
- Captured logs;
11+
- return value;
12+
- Execution time in seconds.
1313

1414
## DummyResultBackend
1515

@@ -18,7 +18,6 @@ where you need actual results.
1818

1919
This broker will always return `None` for any return_value. Please be careful.
2020

21-
2221
## Redis result backend
2322

2423
This result backend is not part of the core taskiq library. You can install it as a separate package [taskiq-redis](https://pypi.org/project/taskiq-redis/).

docs/available-components/schedule-sources.md

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,11 @@
22
order: 4
33
---
44

5-
65
# Available schedule sources
76

87
These objects are used to fetch current schedule for tasks.
98
Currently we have only one schedule source.
109

11-
1210
## LabelScheduleSource
1311

1412
This source parses labels of tasks, and if it finds a `schedule` label, it considers this task as scheduled.
@@ -31,10 +29,11 @@ async def my_task():
3129
```
3230

3331
Parameters:
34-
* `cron` - crontab string when to run the task.
35-
* `args` - args to use, when invoking the task.
36-
* `kwargs` - key-word arguments to use when invoking the task.
37-
* `labels` - additional labels to use wehn invoking the task.
32+
33+
- `cron` - crontab string when to run the task.
34+
- `args` - args to use, when invoking the task.
35+
- `kwargs` - key-word arguments to use when invoking the task.
36+
- `labels` - additional labels to use when invoking the task.
3837

3938
Usage:
4039

@@ -50,7 +49,6 @@ scheduler = TaskiqScheduler(
5049
)
5150
```
5251

53-
5452
::: warning Cool notice!
5553

5654
In order to resolve all labels correctly, don't forget to import

docs/extending-taskiq/README.md

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,19 @@
11
---
22
dir:
3-
order: 2
3+
order: 2
44
---
55

66
# Extending taskiq
77

8-
98
Taskiq is super extendable. The core library comes with different abstract classes.
109
You can implement these abstract classes to extend functionality.
1110

1211
All abstract classes can be found in `taskiq.abc` package.
1312

14-
1513
## Contents:
1614

17-
* [Brokers](./broker.md)
18-
* [Brokers](./broker.md)
19-
* [Result backends](./resutl-backend.md)
20-
* [CLI](./cli.md)
21-
* [Schedule sources](./schedule-sources.md)
15+
- [Brokers](./broker.md)
16+
- [Brokers](./broker.md)
17+
- [Result backends](./resutl-backend.md)
18+
- [CLI](./cli.md)
19+
- [Schedule sources](./schedule-sources.md)

docs/extending-taskiq/broker.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,6 @@ For brokers, we have several conventions. It's good if your broker implements th
1717
These rules are optional, and it's ok if your broker doesn't implement them.
1818

1919
1. If the message has the `delay` label with int or float number, this task's `execution` must be delayed
20-
with the same number of seconds as in the delay label.
20+
with the same number of seconds as in the delay label.
2121
2. If the message has the `priority` label, this message must be sent with priority. Tasks with
22-
higher priorities are executed faster.
22+
higher priorities are executed faster.

docs/extending-taskiq/cli.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,6 @@ demo = "my_project.cmd:MyCommand"
5353
You can read more about entry points in [python documentation](https://packaging.python.org/en/latest/specifications/entry-points/).
5454
The subcommand name is the same as the name of the entry point you've created.
5555

56-
5756
```bash
5857
$ taskiq demo --help
5958
usage: demo [-h] [--test TEST]

docs/extending-taskiq/resutl-backend.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@ order: 3
77
Result backends are used to store information about task execution.
88
To create new `result_backend` you have to implement `taskiq.abc.result_backend.AsyncResultBackend` class.
99

10-
1110
Here's a minimal example of a result backend:
1211

1312
@[code python](../examples/extending/result_backend.py)

0 commit comments

Comments
 (0)