1.2 KiB
1.2 KiB
name, description, metadata
| name | description | metadata | |||||
|---|---|---|---|---|---|---|---|
| task-queue | Redis-based task queue for Kimi's background tasks. Simple heartbeat-driven task execution with active task checking. |
|
Task Queue
Redis-based task queue for Kimi's own background tasks.
Architecture
Redis Keys:
tasks:pending- List of task IDs waiting (FIFO)tasks:active- List of currently active tasks (0-1 items)tasks:completed- List of completed task IDstask:{id}- Hash with full task details
Task Fields:
id- Unique task IDdescription- What to dostatus- pending/active/completed/failedcreated_at- Timestampstarted_at- When picked upcompleted_at- When finishedcreated_by- Who created the taskresult- Output from execution
Scripts
heartbeat_worker.py
Check for tasks at heartbeat, execute if available:
python3 scripts/heartbeat_worker.py
add_task.py
Add a task to the queue:
python3 scripts/add_task.py "Check server disk space"
list_tasks.py
View pending/active/completed tasks:
python3 scripts/list_tasks.py
Redis Config
- Host: 10.0.0.36
- Port: 6379
- No auth (local network)