发布订阅注解方式
Project description
0.1.0
- 在方法上添加@task就可以直接开启一个线程执行任务
- 常用参数:
- 生产者: role="producer",topic="自定义"
- 消费者: role="consumer",subscribe="自定义",publish_after="自定义"
- 说明:
- role: 用于区分上下游 producer/consumer
- topic: 发布的主题
- subscribe: 对哪些主题感兴趣
- publish_after: 消费完后继续发布新主题
- 特别的:方法的返回值可以进行传递,若没有返回值则不会发布新主题(只针对消费者和消费者之间)
0.2.0
- dotask暴露topic_manager=>可以更好的管理生产消费者
- 迁移logger至util包下
- 添加本地调用shell工具函数->可以很好的适配@task消费者
- max_concurrent:控制并发执行的shell数量
- 引入dotask.Shell 调用Shell(max_concurrent=?).local_shell_execute(cmd,callback)来使用
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
dotask-0.2.3.tar.gz
(10.1 kB
view details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
dotask-0.2.3-py3-none-any.whl
(10.8 kB
view details)
File details
Details for the file dotask-0.2.3.tar.gz.
File metadata
- Download URL: dotask-0.2.3.tar.gz
- Upload date:
- Size: 10.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.14.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
3c950a89755317a46c5ce750ad02d2a721e4a412ef63269fe3a6ecb4face6a90
|
|
| MD5 |
10d81a1b7f1e95637fed0444a3f12f1d
|
|
| BLAKE2b-256 |
df84f6ca8adfda1a748b8e1f6994d53c574b96f6a8b974d3b5f539d6f8f02cae
|
File details
Details for the file dotask-0.2.3-py3-none-any.whl.
File metadata
- Download URL: dotask-0.2.3-py3-none-any.whl
- Upload date:
- Size: 10.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.14.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
e42ed1e38119c0fb5c8bb9c2bee1b360906288ac82510e8fabb669e25a47d3bc
|
|
| MD5 |
4a3c7073cf886fb586ac71935241c8a8
|
|
| BLAKE2b-256 |
5ee046ea7b0fc996bd0f0fcef1e2416640c7b7f39fee3606fcbbfb39eff04b30
|