发布订阅注解方式
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.0.tar.gz
(8.0 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
File details
Details for the file dotask-0.2.0.tar.gz.
File metadata
- Download URL: dotask-0.2.0.tar.gz
- Upload date:
- Size: 8.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.14.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
99778874f1e00597243dd553848be18a38730757efd0affb2da103581a94d697
|
|
| MD5 |
6b58c498fb1ab6bd9adacfeaed5e9853
|
|
| BLAKE2b-256 |
33ff8b6e55ae2d983e2ad32f3a8a50e35f807bdcf84d1b55c0f0f7e78c910bef
|
File details
Details for the file dotask-0.2.0-py3-none-any.whl.
File metadata
- Download URL: dotask-0.2.0-py3-none-any.whl
- Upload date:
- Size: 8.4 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 |
35edbb2173209e3451c626ecd19ea737e37c143dc047a594d673caf3657263d7
|
|
| MD5 |
3eb4f79adc20ffc8c8e23ba9628e1128
|
|
| BLAKE2b-256 |
8451c3b6a54d51285f67f518e819ca6f525f1b1b9501ee9b0d60b13265f46bb4
|