Skip to main content

发布订阅注解方式

Project description

0.1.0

  • 在方法上添加@task就可以直接开启一个线程执行任务
  • 常用参数:
    • 生产者: role="producer",topic="自定义"
    • 消费者: role="consumer",subscribe="自定义",publish_after="自定义"
  • 说明:
    • role: 用于区分上下游 producer/consumer
    • topic: 发布的主题
    • subscribe: 对哪些主题感兴趣
    • publish_after: 消费完后继续发布新主题
  • 特别的:方法的返回值可以进行传递,若没有返回值则不会发布新主题(只针对消费者和消费者之间)

0.2.0

  1. dotask暴露topic_manager=>可以更好的管理生产消费者
  2. 迁移logger至util包下
  3. 添加本地调用shell工具函数->可以很好的适配@task消费者
    1. max_concurrent:控制并发执行的shell数量
    2. 引入dotask.Shell 调用Shell(max_concurrent=?).local_shell_execute(cmd,callback)来使用

Project details


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.1.tar.gz (9.7 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

dotask-0.2.1-py3-none-any.whl (10.7 kB view details)

Uploaded Python 3

File details

Details for the file dotask-0.2.1.tar.gz.

File metadata

  • Download URL: dotask-0.2.1.tar.gz
  • Upload date:
  • Size: 9.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.2

File hashes

Hashes for dotask-0.2.1.tar.gz
Algorithm Hash digest
SHA256 55f3c808a9d569cc716477ac7031a10f4153d0c3505d25d3e1e8a743538aaf20
MD5 77020273c7301b1b94d5018b15b180e4
BLAKE2b-256 4e0cf62c535504b3d1ea8b1da85ecb2c0a15bcecae4be2ab062c30e59f2c371d

See more details on using hashes here.

File details

Details for the file dotask-0.2.1-py3-none-any.whl.

File metadata

  • Download URL: dotask-0.2.1-py3-none-any.whl
  • Upload date:
  • Size: 10.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.2

File hashes

Hashes for dotask-0.2.1-py3-none-any.whl
Algorithm Hash digest
SHA256 3fe48ddfb1c3ab1eca19e2e4084a8fc300dd7d96473c621951c74567fa33f0a3
MD5 cd34c3bfebee3923b2d79e4e8259d944
BLAKE2b-256 83fb1792815327eda38c83254df31287a9f72fa8737339d56d59ce042f76c19a

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page