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.6.tar.gz (192.9 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.6-py3-none-any.whl (214.3 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: jettask-0.1.6.tar.gz
  • Upload date:
  • Size: 192.9 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.6.tar.gz
Algorithm Hash digest
SHA256 e01b66f567d0131407bdc60f47dad87c65aade2e84136d8550094328cc1e609a
MD5 8832378db18d43956029d9d35bec5d91
BLAKE2b-256 152dd047230a43c80ecb70e60cff9a06ee7d69410c3df2d92cbccd0a8c45a953

See more details on using hashes here.

File details

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

File metadata

  • Download URL: jettask-0.1.6-py3-none-any.whl
  • Upload date:
  • Size: 214.3 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.6-py3-none-any.whl
Algorithm Hash digest
SHA256 98c622259523dcfbfe5bedfd548f7a44a33d214bb35c3abf8b5b71a2ff7f4100
MD5 7bd4d4987b14c5ef1f7af288af4ddeb5
BLAKE2b-256 d79af670738923b9361ecd038f24b9bae35becf8ccf89d3c8c46b6f90e382655

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