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.2.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.2-py3-none-any.whl (10.7 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: dotask-0.2.2.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.2.tar.gz
Algorithm Hash digest
SHA256 2c183472390966d4a764f2e49cb72ff748dfeca1504e3f73fbe5221ae7e00215
MD5 c6905b95d3f1797e9a73858e7ce5e62d
BLAKE2b-256 bda6f0d868cb7b2cdaf0830f58337abaf6bee4e5d01b2433ce9a72202f50613a

See more details on using hashes here.

File details

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

File metadata

  • Download URL: dotask-0.2.2-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.2-py3-none-any.whl
Algorithm Hash digest
SHA256 c4cc6135bc492ee93c544dcfe0aa700fd2c093fdf3816e4e2dea29101aee1f41
MD5 293be0f2b9dcb5e9f128b06f8ea42617
BLAKE2b-256 a91a8e7a10820d5190adcbdb54347450278011597070e966cffdec9f93b5a8cd

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