Skip to main content

A high-performance distributed task queue system with web monitoring

Project description

JetTask

高性能分布式任务队列系统,带有实时 Web 监控界面。

特性

  • 🚀 高性能: 基于 Redis 和异步 IO 的高性能任务处理
  • 📊 实时监控: 美观的 Web UI 实时监控任务状态
  • 🔄 分布式: 支持多队列、多 Worker 的分布式架构
  • 📈 数据可视化: 任务处理趋势图表和统计分析
  • 🎯 灵活配置: 支持多种任务类型和处理策略
  • 🔍 任务追踪: 完整的任务生命周期追踪

安装

使用 pip 安装

pip install jettask

从源码安装

git clone https://github.com/yourusername/jettask.git
cd jettask
pip install -e .

快速开始

1. 初始化系统

jettask init

2. 启动 Web UI

jettask webui
# 或指定端口
jettask webui --port 8080

访问 http://localhost:8001 查看监控界面

3. 启动 Worker

jettask worker main:app --queues default --concurrency 4

4. 检查系统状态

jettask status

系统要求

  • Python 3.8+
  • Redis 6.0+
  • PostgreSQL 12+

环境配置

创建 .env 文件配置系统参数:

# Redis 配置
REDIS_HOST=localhost
REDIS_PORT=6379
REDIS_DB=0

# PostgreSQL 配置
JETTASK_PG_HOST=localhost
JETTASK_PG_PORT=5432
JETTASK_PG_DB=jettask
JETTASK_PG_USER=jettask
JETTASK_PG_PASSWORD=123456

命令行工具

JetTask 提供了丰富的命令行工具:

# 查看帮助
jettask --help

# 启动 Web UI
jettask webui

# 启动 Worker
jettask worker app:tasks --queues queue1,queue2

# 启动 WebUI 数据消费者
jettask webui-consumer

# 启动监控器
jettask monitor

# 初始化数据库
jettask init

# 查看系统状态
jettask status

开发

安装开发依赖

pip install -e ".[dev]"

运行测试

pytest

代码格式化

black jettask/

架构

┌─────────────┐     ┌─────────────┐     ┌─────────────┐
│   Producer  │────▶│    Redis    │◀────│   Worker    │
└─────────────┘     └─────────────┘     └─────────────┘
                           │                     │
                           ▼                     ▼
                    ┌─────────────┐     ┌─────────────┐
                    │ PostgreSQL  │     │  Monitoring │
                    └─────────────┘     └─────────────┘
                           │                     │
                           └──────────┬──────────┘
                                      ▼
                              ┌─────────────┐
                              │   Web UI    │
                              └─────────────┘

许可证

MIT License

贡献

欢迎提交 Issue 和 Pull Request!

支持

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

jettask-0.1.5.tar.gz (192.5 kB view details)

Uploaded Source

Built Distribution

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

jettask-0.1.5-py3-none-any.whl (214.1 kB view details)

Uploaded Python 3

File details

Details for the file jettask-0.1.5.tar.gz.

File metadata

  • Download URL: jettask-0.1.5.tar.gz
  • Upload date:
  • Size: 192.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.11.13

File hashes

Hashes for jettask-0.1.5.tar.gz
Algorithm Hash digest
SHA256 a59eac82ce5ab254e5e79150baa27e7b7864cd2bf1de6a29deb51b3e5a0adb7b
MD5 947981a60a2133eb6d5bfcf8fea21682
BLAKE2b-256 016c8113c6a87e082fd761e595840081c95ca9f952054b53fae419f5a2d715e7

See more details on using hashes here.

File details

Details for the file jettask-0.1.5-py3-none-any.whl.

File metadata

  • Download URL: jettask-0.1.5-py3-none-any.whl
  • Upload date:
  • Size: 214.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.11.13

File hashes

Hashes for jettask-0.1.5-py3-none-any.whl
Algorithm Hash digest
SHA256 de808e892cc918dfd6a8814d4744e01077329240dad015dcdb52c4a6914a6870
MD5 e9d8a87e068082c5a09d63d001ca6385
BLAKE2b-256 4f9f15294406ad847acfee5c4048afc62c325c51159d200ccd60f57332cd85d7

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