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.3.tar.gz
(192.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
jettask-0.1.3-py3-none-any.whl
(213.7 kB
view details)
File details
Details for the file jettask-0.1.3.tar.gz.
File metadata
- Download URL: jettask-0.1.3.tar.gz
- Upload date:
- Size: 192.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.11.13
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
b2669c7659649b29b723d560e3f9a66e9b02f983bf59fc4ab171bb5c4cf5e5c9
|
|
| MD5 |
5abd59e6857c777c5e21e7130f35b3bf
|
|
| BLAKE2b-256 |
9c1ebdeff25bc483948f323241dd714c150414445f87e3ff20d8759e47920ede
|
File details
Details for the file jettask-0.1.3-py3-none-any.whl.
File metadata
- Download URL: jettask-0.1.3-py3-none-any.whl
- Upload date:
- Size: 213.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.11.13
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
754ab02b0c66361076fe2c60da9fda1598b62e1d5bc6bcc0c86a8275f05bc66b
|
|
| MD5 |
8848d569983e64b72d7665d3358b0c4f
|
|
| BLAKE2b-256 |
4a2176b60380358dc0a28f35e87c71219c38d8c0f29eb0da4b9f2d9206985154
|