celery_root 0.1.0__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- celery_root-0.1.0/.gitignore +38 -0
- celery_root-0.1.0/.pre-commit-config.yaml +59 -0
- celery_root-0.1.0/AGENTS.md +62 -0
- celery_root-0.1.0/AUTHORS.md +11 -0
- celery_root-0.1.0/LICENSES/BSD-3-Clause.txt +11 -0
- celery_root-0.1.0/Makefile +83 -0
- celery_root-0.1.0/NEXT_STEPS.md +65 -0
- celery_root-0.1.0/PKG-INFO +249 -0
- celery_root-0.1.0/README.md +206 -0
- celery_root-0.1.0/celery_root/__init__.py +269 -0
- celery_root-0.1.0/celery_root/cli.py +173 -0
- celery_root-0.1.0/celery_root/components/__init__.py +12 -0
- celery_root-0.1.0/celery_root/components/base.py +44 -0
- celery_root-0.1.0/celery_root/components/beat/__init__.py +11 -0
- celery_root-0.1.0/celery_root/components/beat/controller.py +543 -0
- celery_root-0.1.0/celery_root/components/context.py +30 -0
- celery_root-0.1.0/celery_root/components/mcp/__init__.py +11 -0
- celery_root-0.1.0/celery_root/components/mcp/db.py +54 -0
- celery_root-0.1.0/celery_root/components/mcp/server.py +283 -0
- celery_root-0.1.0/celery_root/components/metrics/__init__.py +11 -0
- celery_root-0.1.0/celery_root/components/metrics/base.py +44 -0
- celery_root-0.1.0/celery_root/components/metrics/opentelemetry/__init__.py +11 -0
- celery_root-0.1.0/celery_root/components/metrics/opentelemetry/exporter.py +406 -0
- celery_root-0.1.0/celery_root/components/metrics/prometheus/__init__.py +11 -0
- celery_root-0.1.0/celery_root/components/metrics/prometheus/exporter.py +366 -0
- celery_root-0.1.0/celery_root/components/metrics/stats.py +35 -0
- celery_root-0.1.0/celery_root/components/web/__init__.py +7 -0
- celery_root-0.1.0/celery_root/components/web/asgi.py +19 -0
- celery_root-0.1.0/celery_root/components/web/auth.py +737 -0
- celery_root-0.1.0/celery_root/components/web/components.py +177 -0
- celery_root-0.1.0/celery_root/components/web/consumers.py +9 -0
- celery_root-0.1.0/celery_root/components/web/context_processors.py +18 -0
- celery_root-0.1.0/celery_root/components/web/devserver.py +102 -0
- celery_root-0.1.0/celery_root/components/web/manage.py +25 -0
- celery_root-0.1.0/celery_root/components/web/services.py +169 -0
- celery_root-0.1.0/celery_root/components/web/settings.py +99 -0
- celery_root-0.1.0/celery_root/components/web/static/css/app.css +1969 -0
- celery_root-0.1.0/celery_root/components/web/static/favicon-16.png +0 -0
- celery_root-0.1.0/celery_root/components/web/static/favicon-16.png.license +5 -0
- celery_root-0.1.0/celery_root/components/web/static/favicon-180.png +0 -0
- celery_root-0.1.0/celery_root/components/web/static/favicon-180.png.license +5 -0
- celery_root-0.1.0/celery_root/components/web/static/favicon-32.png +0 -0
- celery_root-0.1.0/celery_root/components/web/static/favicon-32.png.license +5 -0
- celery_root-0.1.0/celery_root/components/web/static/favicon-64.png +0 -0
- celery_root-0.1.0/celery_root/components/web/static/favicon-64.png.license +5 -0
- celery_root-0.1.0/celery_root/components/web/static/favicon.png +0 -0
- celery_root-0.1.0/celery_root/components/web/static/favicon.png.license +5 -0
- celery_root-0.1.0/celery_root/components/web/static/favicon.svg +3 -0
- celery_root-0.1.0/celery_root/components/web/static/favicon.svg.license +5 -0
- celery_root-0.1.0/celery_root/components/web/static/graph/graph.css +9 -0
- celery_root-0.1.0/celery_root/components/web/static/graph/graph.js +311 -0
- celery_root-0.1.0/celery_root/components/web/static/js/beat-form.js +47 -0
- celery_root-0.1.0/celery_root/components/web/static/js/broker.js +110 -0
- celery_root-0.1.0/celery_root/components/web/static/js/charts.js +110 -0
- celery_root-0.1.0/celery_root/components/web/static/js/dag.js +303 -0
- celery_root-0.1.0/celery_root/components/web/static/js/dashboard-workers.js +144 -0
- celery_root-0.1.0/celery_root/components/web/static/js/dashboard.js +50 -0
- celery_root-0.1.0/celery_root/components/web/static/js/expand-modal.js +333 -0
- celery_root-0.1.0/celery_root/components/web/static/js/filter-form.js +73 -0
- celery_root-0.1.0/celery_root/components/web/static/js/layout.js +33 -0
- celery_root-0.1.0/celery_root/components/web/static/js/logs.js +170 -0
- celery_root-0.1.0/celery_root/components/web/static/js/search.js +46 -0
- celery_root-0.1.0/celery_root/components/web/static/js/select-search.js +96 -0
- celery_root-0.1.0/celery_root/components/web/static/js/settings.js +50 -0
- celery_root-0.1.0/celery_root/components/web/static/js/tabs.js +98 -0
- celery_root-0.1.0/celery_root/components/web/static/js/task-form.js +596 -0
- celery_root-0.1.0/celery_root/components/web/static/js/task-list.js +84 -0
- celery_root-0.1.0/celery_root/components/web/static/js/theme.js +61 -0
- celery_root-0.1.0/celery_root/components/web/static/js/worker-detail.js +110 -0
- celery_root-0.1.0/celery_root/components/web/static/js/workers-fleet.js +20 -0
- celery_root-0.1.0/celery_root/components/web/static/js/workers-list.js +108 -0
- celery_root-0.1.0/celery_root/components/web/static/js/workers-overview.js +49 -0
- celery_root-0.1.0/celery_root/components/web/static/logo-sidebar.png +0 -0
- celery_root-0.1.0/celery_root/components/web/static/logo-sidebar.png.license +5 -0
- celery_root-0.1.0/celery_root/components/web/static/vendor/chart.js +18 -0
- celery_root-0.1.0/celery_root/components/web/static/vendor/cytoscape.js +19 -0
- celery_root-0.1.0/celery_root/components/web/templates/404.html +31 -0
- celery_root-0.1.0/celery_root/components/web/templates/base.html +150 -0
- celery_root-0.1.0/celery_root/components/web/templates/beat/form.html +196 -0
- celery_root-0.1.0/celery_root/components/web/templates/beat.html +88 -0
- celery_root-0.1.0/celery_root/components/web/templates/broker_content.html +139 -0
- celery_root-0.1.0/celery_root/components/web/templates/brokers/_queue_table.html +38 -0
- celery_root-0.1.0/celery_root/components/web/templates/brokers/detail_generic.html +37 -0
- celery_root-0.1.0/celery_root/components/web/templates/brokers/detail_kafka.html +37 -0
- celery_root-0.1.0/celery_root/components/web/templates/brokers/detail_rabbit.html +37 -0
- celery_root-0.1.0/celery_root/components/web/templates/brokers/detail_redis.html +37 -0
- celery_root-0.1.0/celery_root/components/web/templates/brokers/detail_sqs.html +37 -0
- celery_root-0.1.0/celery_root/components/web/templates/dashboard.html +32 -0
- celery_root-0.1.0/celery_root/components/web/templates/dashboard_content.html +90 -0
- celery_root-0.1.0/celery_root/components/web/templates/logs.html +59 -0
- celery_root-0.1.0/celery_root/components/web/templates/opentelemetry.html +40 -0
- celery_root-0.1.0/celery_root/components/web/templates/prometheus.html +45 -0
- celery_root-0.1.0/celery_root/components/web/templates/settings.html +197 -0
- celery_root-0.1.0/celery_root/components/web/templates/tasks/detail.html +298 -0
- celery_root-0.1.0/celery_root/components/web/templates/tasks/graph.html +53 -0
- celery_root-0.1.0/celery_root/components/web/templates/tasks/list.html +393 -0
- celery_root-0.1.0/celery_root/components/web/templates/tasks/submit.html +133 -0
- celery_root-0.1.0/celery_root/components/web/templates/workers/add.html +55 -0
- celery_root-0.1.0/celery_root/components/web/templates/workers/detail.html +35 -0
- celery_root-0.1.0/celery_root/components/web/templates/workers/detail_content.html +451 -0
- celery_root-0.1.0/celery_root/components/web/templates/workers/list.html +46 -0
- celery_root-0.1.0/celery_root/components/web/templates/workers/list_content.html +74 -0
- celery_root-0.1.0/celery_root/components/web/urls.py +70 -0
- celery_root-0.1.0/celery_root/components/web/views/__init__.py +7 -0
- celery_root-0.1.0/celery_root/components/web/views/api.py +165 -0
- celery_root-0.1.0/celery_root/components/web/views/beat.py +251 -0
- celery_root-0.1.0/celery_root/components/web/views/broker.py +389 -0
- celery_root-0.1.0/celery_root/components/web/views/dashboard.py +482 -0
- celery_root-0.1.0/celery_root/components/web/views/decorators.py +19 -0
- celery_root-0.1.0/celery_root/components/web/views/docs.py +27 -0
- celery_root-0.1.0/celery_root/components/web/views/errors.py +29 -0
- celery_root-0.1.0/celery_root/components/web/views/graphs.py +376 -0
- celery_root-0.1.0/celery_root/components/web/views/logs.py +143 -0
- celery_root-0.1.0/celery_root/components/web/views/metrics.py +49 -0
- celery_root-0.1.0/celery_root/components/web/views/settings.py +82 -0
- celery_root-0.1.0/celery_root/components/web/views/system.py +74 -0
- celery_root-0.1.0/celery_root/components/web/views/tasks.py +1322 -0
- celery_root-0.1.0/celery_root/components/web/views/workers.py +764 -0
- celery_root-0.1.0/celery_root/components/web/wsgi.py +17 -0
- celery_root-0.1.0/celery_root/config.py +228 -0
- celery_root-0.1.0/celery_root/core/__init__.py +11 -0
- celery_root-0.1.0/celery_root/core/component_status.py +144 -0
- celery_root-0.1.0/celery_root/core/control.py +26 -0
- celery_root-0.1.0/celery_root/core/db/__init__.py +37 -0
- celery_root-0.1.0/celery_root/core/db/adapters/__init__.py +13 -0
- celery_root-0.1.0/celery_root/core/db/adapters/base.py +150 -0
- celery_root-0.1.0/celery_root/core/db/adapters/memory/__init__.py +441 -0
- celery_root-0.1.0/celery_root/core/db/adapters/sqlite/__init__.py +838 -0
- celery_root-0.1.0/celery_root/core/db/manager.py +169 -0
- celery_root-0.1.0/celery_root/core/db/models/__init__.py +167 -0
- celery_root-0.1.0/celery_root/core/engine/__init__.py +42 -0
- celery_root-0.1.0/celery_root/core/engine/backend.py +148 -0
- celery_root-0.1.0/celery_root/core/engine/backends/__init__.py +9 -0
- celery_root-0.1.0/celery_root/core/engine/backends/redis/__init__.py +9 -0
- celery_root-0.1.0/celery_root/core/engine/backends/sqlalchemy/__init__.py +9 -0
- celery_root-0.1.0/celery_root/core/engine/beat.py +77 -0
- celery_root-0.1.0/celery_root/core/engine/brokers/__init__.py +11 -0
- celery_root-0.1.0/celery_root/core/engine/brokers/base.py +217 -0
- celery_root-0.1.0/celery_root/core/engine/brokers/rabbitmq/__init__.py +9 -0
- celery_root-0.1.0/celery_root/core/engine/brokers/redis/__init__.py +9 -0
- celery_root-0.1.0/celery_root/core/engine/health.py +79 -0
- celery_root-0.1.0/celery_root/core/engine/retry.py +156 -0
- celery_root-0.1.0/celery_root/core/engine/tasks.py +129 -0
- celery_root-0.1.0/celery_root/core/engine/workers.py +203 -0
- celery_root-0.1.0/celery_root/core/event_listener.py +343 -0
- celery_root-0.1.0/celery_root/core/inspector.py +26 -0
- celery_root-0.1.0/celery_root/core/logging/__init__.py +11 -0
- celery_root-0.1.0/celery_root/core/logging/adapters/__init__.py +12 -0
- celery_root-0.1.0/celery_root/core/logging/adapters/base.py +36 -0
- celery_root-0.1.0/celery_root/core/logging/adapters/file.py +72 -0
- celery_root-0.1.0/celery_root/core/logging/setup.py +55 -0
- celery_root-0.1.0/celery_root/core/logging/utils.py +56 -0
- celery_root-0.1.0/celery_root/core/process_manager.py +360 -0
- celery_root-0.1.0/celery_root/core/registry.py +106 -0
- celery_root-0.1.0/celery_root/py.typed +0 -0
- celery_root-0.1.0/demo/Dockerfile +18 -0
- celery_root-0.1.0/demo/README.md +75 -0
- celery_root-0.1.0/demo/__init__.py +13 -0
- celery_root-0.1.0/demo/common.py +138 -0
- celery_root-0.1.0/demo/infra.docker-compose.yml +81 -0
- celery_root-0.1.0/demo/main.py +37 -0
- celery_root-0.1.0/demo/otel-collector-config.yaml +23 -0
- celery_root-0.1.0/demo/run_graph_demo.py +58 -0
- celery_root-0.1.0/demo/schedule_demo_tasks.py +228 -0
- celery_root-0.1.0/demo/schedule_tasks.py +116 -0
- celery_root-0.1.0/demo/worker.docker-compose.yml +41 -0
- celery_root-0.1.0/demo/worker_math.py +389 -0
- celery_root-0.1.0/demo/worker_sleep.py +44 -0
- celery_root-0.1.0/demo/worker_text.py +237 -0
- celery_root-0.1.0/frontend/graph-ui/package-lock.json +1980 -0
- celery_root-0.1.0/frontend/graph-ui/package-lock.json.license +5 -0
- celery_root-0.1.0/frontend/graph-ui/package.json +25 -0
- celery_root-0.1.0/frontend/graph-ui/package.json.license +5 -0
- celery_root-0.1.0/frontend/graph-ui/src/GraphApp.tsx +522 -0
- celery_root-0.1.0/frontend/graph-ui/src/components/ChordJoinNode.tsx +47 -0
- celery_root-0.1.0/frontend/graph-ui/src/components/DetailsPanel.tsx +124 -0
- celery_root-0.1.0/frontend/graph-ui/src/components/GroupNode.tsx +24 -0
- celery_root-0.1.0/frontend/graph-ui/src/components/Legend.tsx +44 -0
- celery_root-0.1.0/frontend/graph-ui/src/components/SelfLoopEdge.tsx +72 -0
- celery_root-0.1.0/frontend/graph-ui/src/components/TaskNode.tsx +98 -0
- celery_root-0.1.0/frontend/graph-ui/src/components/Toolbar.tsx +87 -0
- celery_root-0.1.0/frontend/graph-ui/src/entry.tsx +64 -0
- celery_root-0.1.0/frontend/graph-ui/src/graph/layout.ts +58 -0
- celery_root-0.1.0/frontend/graph-ui/src/graph/stateColors.ts +37 -0
- celery_root-0.1.0/frontend/graph-ui/src/graph/transforms.ts +675 -0
- celery_root-0.1.0/frontend/graph-ui/src/graph/types.ts +81 -0
- celery_root-0.1.0/frontend/graph-ui/src/styles/index.css +587 -0
- celery_root-0.1.0/frontend/graph-ui/tsconfig.json +15 -0
- celery_root-0.1.0/frontend/graph-ui/tsconfig.json.license +5 -0
- celery_root-0.1.0/frontend/graph-ui/vite.config.ts +34 -0
- celery_root-0.1.0/pyproject.toml +155 -0
- celery_root-0.1.0/tests/__init__.py +0 -0
- celery_root-0.1.0/tests/conftest.py +107 -0
- celery_root-0.1.0/tests/fixtures/__init__.py +7 -0
- celery_root-0.1.0/tests/fixtures/app_one.py +20 -0
- celery_root-0.1.0/tests/fixtures/app_two.py +20 -0
- celery_root-0.1.0/tests/test_cnc_backend.py +102 -0
- celery_root-0.1.0/tests/test_cnc_beat.py +143 -0
- celery_root-0.1.0/tests/test_cnc_broker.py +129 -0
- celery_root-0.1.0/tests/test_cnc_health.py +100 -0
- celery_root-0.1.0/tests/test_cnc_retry.py +182 -0
- celery_root-0.1.0/tests/test_cnc_tasks.py +175 -0
- celery_root-0.1.0/tests/test_cnc_workers.py +178 -0
- celery_root-0.1.0/tests/test_core_beat.py +61 -0
- celery_root-0.1.0/tests/test_db_controllers.py +190 -0
- celery_root-0.1.0/tests/test_event_listener.py +9 -0
- celery_root-0.1.0/tests/test_integration_pipeline.py +110 -0
- celery_root-0.1.0/tests/test_logging_controller.py +41 -0
- celery_root-0.1.0/tests/test_monitoring_exporters.py +355 -0
- celery_root-0.1.0/tests/test_monitoring_stats.py +119 -0
- celery_root-0.1.0/tests/test_registry.py +43 -0
- celery_root-0.1.0/tests/test_task_schema.py +16 -0
- celery_root-0.1.0/tests/test_web_auth.py +30 -0
- celery_root-0.1.0/tests/test_web_views.py +102 -0
- celery_root-0.1.0/uv.lock +2504 -0
- celery_root-0.1.0/uv.lock.license +5 -0
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
# SPDX-FileCopyrightText: 2026 Christian-Hauke Poensgen
|
|
2
|
+
# SPDX-FileCopyrightText: 2026 Maximilian Dolling
|
|
3
|
+
# SPDX-FileContributor: AUTHORS.md
|
|
4
|
+
#
|
|
5
|
+
# SPDX-License-Identifier: BSD-3-Clause
|
|
6
|
+
|
|
7
|
+
__pycache__/
|
|
8
|
+
*.py[cod]
|
|
9
|
+
*.egg-info/
|
|
10
|
+
.dist/
|
|
11
|
+
dist/
|
|
12
|
+
build/
|
|
13
|
+
.venv/
|
|
14
|
+
node_modules/
|
|
15
|
+
.env
|
|
16
|
+
.env.*
|
|
17
|
+
.mypy_cache/
|
|
18
|
+
.pytest_cache/
|
|
19
|
+
.ruff_cache/
|
|
20
|
+
.db
|
|
21
|
+
*.db
|
|
22
|
+
*.db-shm
|
|
23
|
+
*.db-wal
|
|
24
|
+
.db-shm
|
|
25
|
+
.db-wal
|
|
26
|
+
*.sqlite3
|
|
27
|
+
celerybeat-schedule
|
|
28
|
+
celerybeat-schedule.*
|
|
29
|
+
logs/
|
|
30
|
+
*.log
|
|
31
|
+
.idea/
|
|
32
|
+
.vscode/
|
|
33
|
+
.DS_Store
|
|
34
|
+
/demo/data
|
|
35
|
+
/celery_root/web/
|
|
36
|
+
.coverage
|
|
37
|
+
coverage.xml
|
|
38
|
+
/htmlcov/
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
# SPDX-FileCopyrightText: 2026 Christian-Hauke Poensgen
|
|
2
|
+
# SPDX-FileCopyrightText: 2026 Maximilian Dolling
|
|
3
|
+
# SPDX-FileContributor: AUTHORS.md
|
|
4
|
+
#
|
|
5
|
+
# SPDX-License-Identifier: BSD-3-Clause
|
|
6
|
+
|
|
7
|
+
default_language_version:
|
|
8
|
+
python: python3.14
|
|
9
|
+
|
|
10
|
+
repos:
|
|
11
|
+
- repo: https://github.com/pre-commit/pre-commit-hooks
|
|
12
|
+
rev: v6.0.0
|
|
13
|
+
hooks:
|
|
14
|
+
- id: trailing-whitespace
|
|
15
|
+
args:
|
|
16
|
+
- --markdown-linebreak-ext=md
|
|
17
|
+
- id: end-of-file-fixer
|
|
18
|
+
- id: check-json
|
|
19
|
+
exclude: ^frontend/graph-ui/node_modules/
|
|
20
|
+
- id: check-toml
|
|
21
|
+
- id: check-yaml
|
|
22
|
+
args: [--allow-multiple-documents]
|
|
23
|
+
- id: check-ast
|
|
24
|
+
- id: check-case-conflict
|
|
25
|
+
- id: debug-statements
|
|
26
|
+
- id: detect-private-key
|
|
27
|
+
- id: name-tests-test
|
|
28
|
+
args: [--pytest-test-first]
|
|
29
|
+
exclude: ^tests/fixtures/
|
|
30
|
+
|
|
31
|
+
- repo: https://github.com/charliermarsh/ruff-pre-commit
|
|
32
|
+
rev: 'v0.15.0'
|
|
33
|
+
hooks:
|
|
34
|
+
# Run the formatter.
|
|
35
|
+
- id: ruff-format
|
|
36
|
+
# Run the linter.
|
|
37
|
+
- id: ruff-check
|
|
38
|
+
args: [ --fix ]
|
|
39
|
+
- repo: https://github.com/fsfe/reuse-tool
|
|
40
|
+
rev: 'v6.2.0'
|
|
41
|
+
hooks:
|
|
42
|
+
- id: reuse
|
|
43
|
+
|
|
44
|
+
- repo: local
|
|
45
|
+
hooks:
|
|
46
|
+
- id: mypy
|
|
47
|
+
name: mypy
|
|
48
|
+
entry: uv run mypy celery_root demo tests
|
|
49
|
+
language: system
|
|
50
|
+
types: [python]
|
|
51
|
+
pass_filenames: false
|
|
52
|
+
args: []
|
|
53
|
+
- id: pytest
|
|
54
|
+
name: pytest
|
|
55
|
+
entry: make test
|
|
56
|
+
language: system
|
|
57
|
+
pass_filenames: false
|
|
58
|
+
always_run: true
|
|
59
|
+
args: []
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
<!--
|
|
2
|
+
SPDX-FileCopyrightText: 2026 Christian-Hauke Poensgen
|
|
3
|
+
SPDX-FileCopyrightText: 2026 Maximilian Dolling
|
|
4
|
+
SPDX-FileContributor: AUTHORS.md
|
|
5
|
+
|
|
6
|
+
SPDX-License-Identifier: BSD-3-Clause
|
|
7
|
+
-->
|
|
8
|
+
|
|
9
|
+
# Agent guidelines — Celery Root
|
|
10
|
+
|
|
11
|
+
Instructions for AI agents (and humans) working in this repo.
|
|
12
|
+
|
|
13
|
+
---
|
|
14
|
+
|
|
15
|
+
## Version control
|
|
16
|
+
|
|
17
|
+
- We use **git**. All changes go through commits; work is tracked in branches/PRs as appropriate.
|
|
18
|
+
- Before committing, run the checks below (or rely on pre-commit).
|
|
19
|
+
|
|
20
|
+
---
|
|
21
|
+
|
|
22
|
+
## Code quality
|
|
23
|
+
|
|
24
|
+
### Typing and mypy
|
|
25
|
+
|
|
26
|
+
- **Fully typed:** All Python code must be type-annotated. Use type hints for function parameters, return types, and module-level names where it helps clarity.
|
|
27
|
+
- **mypy (strict):** The codebase is checked with mypy in strict mode. No commits that break `mypy` on the project.
|
|
28
|
+
|
|
29
|
+
Run type checking:
|
|
30
|
+
|
|
31
|
+
```bash
|
|
32
|
+
make lint
|
|
33
|
+
```
|
|
34
|
+
|
|
35
|
+
### Rough checks (pre-commit)
|
|
36
|
+
|
|
37
|
+
We use **pre-commit** to run a consistent set of checks before each commit. Install and run:
|
|
38
|
+
|
|
39
|
+
```bash
|
|
40
|
+
uv run pre-commit install
|
|
41
|
+
```
|
|
42
|
+
|
|
43
|
+
Thereafter, every `git commit` runs the configured hooks (e.g. ruff, mypy, tests). Fix any failures before committing, or temporarily bypass with `git commit --no-verify` only when justified.
|
|
44
|
+
|
|
45
|
+
Typical hooks to have:
|
|
46
|
+
|
|
47
|
+
- **ruff** — lint and format (or separate format hook).
|
|
48
|
+
- **mypy** — type checking.
|
|
49
|
+
- Optional: **pytest** or a fast smoke test so the tree stays green.
|
|
50
|
+
|
|
51
|
+
Pre-commit config lives in `.pre-commit-config.yaml`. Keep it so that “rough” checks (lint + types + maybe a quick test) pass on commit.
|
|
52
|
+
|
|
53
|
+
---
|
|
54
|
+
|
|
55
|
+
## Summary
|
|
56
|
+
|
|
57
|
+
| Requirement | How |
|
|
58
|
+
|-------------|-----|
|
|
59
|
+
| Fully typed | Type hints throughout; mypy strict. |
|
|
60
|
+
| mypy checked | `uv run mypy` must pass. |
|
|
61
|
+
| Rough checks on commit | pre-commit hooks (ruff, mypy, etc.). |
|
|
62
|
+
| Git | All changes via git; no bypassing checks without good reason. |
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
<!--
|
|
2
|
+
SPDX-FileCopyrightText: 2026 Christian-Hauke Poensgen
|
|
3
|
+
SPDX-FileCopyrightText: 2026 Maximilian Dolling
|
|
4
|
+
SPDX-FileContributor: AUTHORS.md
|
|
5
|
+
|
|
6
|
+
SPDX-License-Identifier: BSD-3-Clause
|
|
7
|
+
-->
|
|
8
|
+
|
|
9
|
+
- Christian-Hauke Poensgen
|
|
10
|
+
- OpenAI Codex
|
|
11
|
+
- Maximilian Dolling
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
Copyright (c) 2026, Entities listed in ../AUTHORS.md
|
|
2
|
+
|
|
3
|
+
Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
|
|
4
|
+
|
|
5
|
+
1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
|
|
6
|
+
|
|
7
|
+
2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
|
|
8
|
+
|
|
9
|
+
3. Neither the name of the copyright holder nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.
|
|
10
|
+
|
|
11
|
+
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
# SPDX-FileCopyrightText: 2026 Christian-Hauke Poensgen
|
|
2
|
+
# SPDX-FileCopyrightText: 2026 Maximilian Dolling
|
|
3
|
+
# SPDX-FileContributor: AUTHORS.md
|
|
4
|
+
#
|
|
5
|
+
# SPDX-License-Identifier: BSD-3-Clause
|
|
6
|
+
|
|
7
|
+
SHELL := /bin/sh
|
|
8
|
+
|
|
9
|
+
.PHONY: build \
|
|
10
|
+
dist \
|
|
11
|
+
dist_clean \
|
|
12
|
+
install \
|
|
13
|
+
lint \
|
|
14
|
+
publish \
|
|
15
|
+
publish_test
|
|
16
|
+
|
|
17
|
+
install_frontend:
|
|
18
|
+
npm --prefix frontend/graph-ui install
|
|
19
|
+
|
|
20
|
+
install_backend:
|
|
21
|
+
uv sync --all-extras --dev --frozen
|
|
22
|
+
uv run pre-commit install
|
|
23
|
+
|
|
24
|
+
install: install_backend install_frontend
|
|
25
|
+
|
|
26
|
+
clean:
|
|
27
|
+
rm -rf demo/data/logs
|
|
28
|
+
|
|
29
|
+
build_frontend: install_frontend
|
|
30
|
+
npm --prefix frontend/graph-ui run build
|
|
31
|
+
|
|
32
|
+
build: build_frontend
|
|
33
|
+
|
|
34
|
+
dist: build_frontend
|
|
35
|
+
uv build --no-sources
|
|
36
|
+
|
|
37
|
+
dist_clean:
|
|
38
|
+
rm -rf dist
|
|
39
|
+
|
|
40
|
+
lint:
|
|
41
|
+
uv run pre-commit run --all-files
|
|
42
|
+
|
|
43
|
+
test: test_ci
|
|
44
|
+
uv run coverage html
|
|
45
|
+
|
|
46
|
+
test_ci:
|
|
47
|
+
uv run coverage run --branch -m pytest -q -vv
|
|
48
|
+
uv run coverage xml
|
|
49
|
+
uv run coverage report
|
|
50
|
+
|
|
51
|
+
docker_network:
|
|
52
|
+
docker network create celery_root_demo || true
|
|
53
|
+
|
|
54
|
+
demo_stop_infra:
|
|
55
|
+
docker compose -p celery_root_demo -f demo/infra.docker-compose.yml down --volumes --remove-orphans
|
|
56
|
+
|
|
57
|
+
demo_start_infra: docker_network
|
|
58
|
+
docker compose -p celery_root_demo -f demo/infra.docker-compose.yml up -d
|
|
59
|
+
|
|
60
|
+
demo_worker_math: demo_start_infra
|
|
61
|
+
uv run celery -A demo.worker_math worker -n math@%h -l INFO
|
|
62
|
+
|
|
63
|
+
demo_worker_text: demo_start_infra
|
|
64
|
+
uv run celery -A demo.worker_text worker -n text@%h -l INFO
|
|
65
|
+
|
|
66
|
+
demo_worker_sleep: demo_start_infra
|
|
67
|
+
BROKER3_URL=$(BROKER3_URL) BACKEND3_URL=$(BACKEND3_URL) uv run celery -A demo.worker_sleep worker -n sleep@%h -l INFO
|
|
68
|
+
|
|
69
|
+
demo_workers: demo_start_infra
|
|
70
|
+
docker compose -p celery_root_demo -f demo/worker.docker-compose.yml up --build
|
|
71
|
+
|
|
72
|
+
demo_tasks:
|
|
73
|
+
uv run python demo/schedule_demo_tasks.py
|
|
74
|
+
|
|
75
|
+
demo_graph_tasks:
|
|
76
|
+
uv run python demo/schedule_demo_tasks.py
|
|
77
|
+
|
|
78
|
+
demo_root: clean build
|
|
79
|
+
uv run python celery_root/components/web/manage.py migrate
|
|
80
|
+
uv run python demo/main.py
|
|
81
|
+
|
|
82
|
+
apply_license:
|
|
83
|
+
uv run reuse annotate -c "Christian-Hauke Poensgen" -c "Maximilian Dolling" -l "BSD-3-Clause" -y "2026" --contributor "AUTHORS.md" -r .
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
<!--
|
|
2
|
+
SPDX-FileCopyrightText: 2026 Christian-Hauke Poensgen
|
|
3
|
+
SPDX-FileCopyrightText: 2026 Maximilian Dolling
|
|
4
|
+
SPDX-FileContributor: AUTHORS.md
|
|
5
|
+
|
|
6
|
+
SPDX-License-Identifier: BSD-3-Clause
|
|
7
|
+
-->
|
|
8
|
+
|
|
9
|
+
# NEXT_STEPS
|
|
10
|
+
|
|
11
|
+
## Flower config parity (backwards compatibility)
|
|
12
|
+
|
|
13
|
+
Source: https://flower.readthedocs.io/en/latest/config.html
|
|
14
|
+
|
|
15
|
+
Legend: [x] supported, [~] partial, [ ] missing
|
|
16
|
+
|
|
17
|
+
| Flower option | Meaning (short) | Root status | Current mapping / notes |
|
|
18
|
+
| --- | --- | --- | --- |
|
|
19
|
+
| address | bind address | [~] | `FrontendConfig.host` in `celery_root/config.py` (defaults differ: Flower empty string vs Root 127.0.0.1) |
|
|
20
|
+
| port | bind port | [~] | `FrontendConfig.port` in `celery_root/config.py` (defaults differ: Flower 5555 vs Root 8000) |
|
|
21
|
+
| debug | debug mode | [x] | `FrontendConfig.debug` + CLI `--debug/--no-debug` |
|
|
22
|
+
| auth | allowlist regex | [x] | `FrontendConfig.auth` via `celery_root/components/web/auth.py` (supports FLOWER_AUTH) |
|
|
23
|
+
| basic_auth | basic auth users | [x] | `FrontendConfig.basic_auth` via `celery_root/components/web/auth.py` (supports FLOWER_BASIC_AUTH) |
|
|
24
|
+
| auth_provider | oauth provider | [x] | `FrontendConfig.auth_provider` (supports FLOWER_AUTH_PROVIDER) |
|
|
25
|
+
| oauth2_key | oauth client id | [x] | `FrontendConfig.oauth2_key` (supports FLOWER_OAUTH2_KEY) |
|
|
26
|
+
| oauth2_secret | oauth client secret | [x] | `FrontendConfig.oauth2_secret` (supports FLOWER_OAUTH2_SECRET) |
|
|
27
|
+
| oauth2_redirect_uri | oauth redirect | [x] | `FrontendConfig.oauth2_redirect_uri` (supports FLOWER_OAUTH2_REDIRECT_URI) |
|
|
28
|
+
| cookie_secret | secure cookie secret | [ ] | No explicit mapping; Django uses `FrontendConfig.secret_key` but not Flower compatible |
|
|
29
|
+
| xheaders | trust proxy headers | [ ] | Not implemented in Django middleware stack |
|
|
30
|
+
| url_prefix | non-root UI path | [ ] | No URL prefix support in routing/static paths |
|
|
31
|
+
| unix_socket | run on unix socket | [ ] | Dev server does not support UNIX sockets |
|
|
32
|
+
| certfile | TLS cert | [ ] | No TLS support in dev server/uvicorn |
|
|
33
|
+
| keyfile | TLS key | [ ] | No TLS support in dev server/uvicorn |
|
|
34
|
+
| ca_certs | TLS CA bundle | [ ] | No TLS support in dev server/uvicorn |
|
|
35
|
+
| broker_api | RabbitMQ management API | [ ] | No broker management API integration |
|
|
36
|
+
| enable_events | periodic enable_events | [~] | Always enabled in `celery_root/core/event_listener.py`, not configurable |
|
|
37
|
+
| inspect_timeout | inspect timeout (ms) | [ ] | Fixed at 1.0s in `celery_root/core/engine/brokers/base.py` |
|
|
38
|
+
| auto_refresh | auto-refresh workers | [ ] | JS polling exists but no config flag or env mapping |
|
|
39
|
+
| natural_time | relative timestamps | [ ] | UI uses absolute timestamps only |
|
|
40
|
+
| tasks_columns | /tasks columns | [ ] | Columns fixed in `celery_root/components/web/templates/tasks/list.html` |
|
|
41
|
+
| format_task | custom task formatter | [ ] | No hook for redaction/formatting |
|
|
42
|
+
| persistent | persist state | [~] | Always persists to SQLite; no toggle |
|
|
43
|
+
| db | state db file | [~] | `DatabaseConfigSqlite.db_path` exists, not Flower-compatible flag |
|
|
44
|
+
| state_save_interval | periodic state save | [ ] | DB writes are continuous; no interval control |
|
|
45
|
+
| max_workers | memory cap for workers | [ ] | No cap implemented |
|
|
46
|
+
| max_tasks | memory cap for tasks | [ ] | No cap implemented |
|
|
47
|
+
| purge_offline_workers | auto-prune offline | [ ] | No auto-prune behavior |
|
|
48
|
+
| task_runtime_metric_buckets | metrics buckets | [ ] | Buckets are fixed in metrics exporters |
|
|
49
|
+
| conf | config file path | [ ] | No `flowerconfig.py` loader or `--conf` |
|
|
50
|
+
|
|
51
|
+
## Missing compatibility surfaces
|
|
52
|
+
|
|
53
|
+
- [ ] Load `flowerconfig.py` / `--conf` and map keys into `CeleryRootConfig`.
|
|
54
|
+
- [ ] Read all `FLOWER_*` env vars (not just auth) and map to Root settings.
|
|
55
|
+
- [ ] CLI flags parity for Flower options (accept `celery flower ...` style flags for the Celery Root entrypoint).
|
|
56
|
+
|
|
57
|
+
## Feature parity tasks (top priority)
|
|
58
|
+
|
|
59
|
+
- [ ] Implement `url_prefix` and `xheaders` for reverse proxy deployments.
|
|
60
|
+
- [ ] Add TLS support or document proxy termination (`certfile`/`keyfile`/`ca_certs`).
|
|
61
|
+
- [ ] Make event enabling configurable (`enable_events`, `inspect_timeout`).
|
|
62
|
+
- [ ] Add task list customization (`tasks_columns`, `format_task`, `natural_time`).
|
|
63
|
+
- [ ] Add state retention controls (`persistent`, `db`, `state_save_interval`, `max_workers`, `max_tasks`, `purge_offline_workers`).
|
|
64
|
+
- [ ] Implement broker management integration (`broker_api`) for queue stats.
|
|
65
|
+
- [ ] Make metrics buckets configurable (`task_runtime_metric_buckets`).
|
|
@@ -0,0 +1,249 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: celery_root
|
|
3
|
+
Version: 0.1.0
|
|
4
|
+
Summary: Command & Control for Celery Workers
|
|
5
|
+
Project-URL: Documentation, https://docs.celeryroot.eu/
|
|
6
|
+
Project-URL: Repository, https://github.com/christianhpoe/celery_root
|
|
7
|
+
Project-URL: Issues, https://github.com/christianhpoe/celery_root/issues
|
|
8
|
+
Author: Christian-Hauke Poensgen, Maximilian Dolling
|
|
9
|
+
License-Expression: BSD-3-Clause
|
|
10
|
+
License-File: LICENSES/BSD-3-Clause.txt
|
|
11
|
+
Keywords: celery,mcp,monitoring,observability,otel,prometheus
|
|
12
|
+
Classifier: Development Status :: 3 - Alpha
|
|
13
|
+
Classifier: Framework :: Celery
|
|
14
|
+
Classifier: Intended Audience :: Developers
|
|
15
|
+
Classifier: Intended Audience :: Information Technology
|
|
16
|
+
Classifier: Operating System :: OS Independent
|
|
17
|
+
Classifier: Programming Language :: Python
|
|
18
|
+
Classifier: Programming Language :: Python :: 3
|
|
19
|
+
Classifier: Programming Language :: Python :: 3 :: Only
|
|
20
|
+
Classifier: Programming Language :: Python :: 3.10
|
|
21
|
+
Classifier: Programming Language :: Python :: 3.11
|
|
22
|
+
Classifier: Programming Language :: Python :: 3.12
|
|
23
|
+
Classifier: Programming Language :: Python :: 3.13
|
|
24
|
+
Classifier: Programming Language :: Python :: 3.14
|
|
25
|
+
Classifier: Topic :: Software Development
|
|
26
|
+
Classifier: Topic :: Software Development :: Libraries
|
|
27
|
+
Classifier: Topic :: Software Development :: Libraries :: Python Modules
|
|
28
|
+
Classifier: Topic :: System :: Distributed Computing
|
|
29
|
+
Classifier: Typing :: Typed
|
|
30
|
+
Requires-Python: <3.15,>=3.12
|
|
31
|
+
Requires-Dist: celery[tblib]<6,>=5.0.5
|
|
32
|
+
Requires-Dist: click>=8.1
|
|
33
|
+
Requires-Dist: django<7,>=4
|
|
34
|
+
Requires-Dist: fastmcp<3,>=2.12
|
|
35
|
+
Requires-Dist: opentelemetry-exporter-otlp<2,>=1.33
|
|
36
|
+
Requires-Dist: opentelemetry-sdk<2,>=1.30
|
|
37
|
+
Requires-Dist: prometheus-client<1,>=0.13.0
|
|
38
|
+
Requires-Dist: pydantic-settings<3,>=2.5
|
|
39
|
+
Requires-Dist: pydantic>=2.12
|
|
40
|
+
Requires-Dist: sqlalchemy<3,>=2
|
|
41
|
+
Requires-Dist: uvicorn<1,>=0.35.0
|
|
42
|
+
Description-Content-Type: text/markdown
|
|
43
|
+
|
|
44
|
+
<!--
|
|
45
|
+
SPDX-FileCopyrightText: 2026 Christian-Hauke Poensgen
|
|
46
|
+
SPDX-FileCopyrightText: 2026 Maximilian Dolling
|
|
47
|
+
SPDX-FileContributor: AUTHORS.md
|
|
48
|
+
|
|
49
|
+
SPDX-License-Identifier: BSD-3-Clause
|
|
50
|
+
-->
|
|
51
|
+
|
|
52
|
+
# Celery Root
|
|
53
|
+
|
|
54
|
+
Docs: https://docs.celeryroot.eu
|
|
55
|
+
|
|
56
|
+
Celery Root is a command & control plane for Celery
|
|
57
|
+
It ships with a Django-based UI, a lightweight event listener/collector, and helper utilities for inspecting
|
|
58
|
+
queues, tasks, workers, and beat schedules. The distribution and Python package names are still
|
|
59
|
+
`celery_root` for compatibility; only the product name and visuals have changed.
|
|
60
|
+
|
|
61
|
+
## Features
|
|
62
|
+
|
|
63
|
+
- Task list with filtering, sorting, and details (args/kwargs/result/traceback).
|
|
64
|
+
- Task relation graph visualization.
|
|
65
|
+
- Worker fleet overview and per-worker drill-down.
|
|
66
|
+
- Broker queue inspection and purge actions.
|
|
67
|
+
- Beat schedule overview and editor.
|
|
68
|
+
- Pluggable storage (SQLite by default).
|
|
69
|
+
|
|
70
|
+
## Quickstart (demo)
|
|
71
|
+
|
|
72
|
+
Requirements: Python >= 3.10, `uv`, and Docker (for the demo broker/redis).
|
|
73
|
+
|
|
74
|
+
```bash
|
|
75
|
+
make demo-infra
|
|
76
|
+
```
|
|
77
|
+
|
|
78
|
+
Start the demo workers in separate terminals:
|
|
79
|
+
|
|
80
|
+
```bash
|
|
81
|
+
make demo-worker-math
|
|
82
|
+
```
|
|
83
|
+
|
|
84
|
+
```bash
|
|
85
|
+
make demo-worker-text
|
|
86
|
+
```
|
|
87
|
+
|
|
88
|
+
Launch the Celery Root supervisor + web UI:
|
|
89
|
+
|
|
90
|
+
```bash
|
|
91
|
+
make demo-root
|
|
92
|
+
```
|
|
93
|
+
|
|
94
|
+
Then open `http://127.0.0.1:5555`.
|
|
95
|
+
|
|
96
|
+
To enqueue demo tasks:
|
|
97
|
+
|
|
98
|
+
```bash
|
|
99
|
+
make demo-tasks
|
|
100
|
+
```
|
|
101
|
+
|
|
102
|
+
## Running the web UI
|
|
103
|
+
|
|
104
|
+
If you already have Celery workers and a broker running, you can point the UI at your apps via
|
|
105
|
+
`CELERY_ROOT_WORKERS` and run the web server:
|
|
106
|
+
|
|
107
|
+
```bash
|
|
108
|
+
export CELERY_ROOT_WORKERS="your_app.celery:app,another_app.celery:app"
|
|
109
|
+
uv run python celery_root/components/web/manage.py migrate
|
|
110
|
+
uv run python -m celery_root.components.web.devserver --host 127.0.0.1 --port 8000
|
|
111
|
+
```
|
|
112
|
+
|
|
113
|
+
The UI reads task/worker data from the Celery Root SQLite store (see configuration below).
|
|
114
|
+
|
|
115
|
+
## CLI usage
|
|
116
|
+
|
|
117
|
+
You can run the supervisor via the CLI, either standalone or as a Celery subcommand.
|
|
118
|
+
|
|
119
|
+
Standalone:
|
|
120
|
+
|
|
121
|
+
```bash
|
|
122
|
+
celery-root -A demo.worker_math:app
|
|
123
|
+
```
|
|
124
|
+
|
|
125
|
+
Via Celery:
|
|
126
|
+
|
|
127
|
+
```bash
|
|
128
|
+
celery -A demo.worker_math:app celery_root
|
|
129
|
+
```
|
|
130
|
+
|
|
131
|
+
## Configuration
|
|
132
|
+
|
|
133
|
+
Configuration is explicit via Pydantic models:
|
|
134
|
+
|
|
135
|
+
```python
|
|
136
|
+
from pathlib import Path
|
|
137
|
+
|
|
138
|
+
from celery_root import (
|
|
139
|
+
BeatConfig,
|
|
140
|
+
CeleryRootConfig,
|
|
141
|
+
DatabaseConfigSqlite,
|
|
142
|
+
FrontendConfig,
|
|
143
|
+
LoggingConfigFile,
|
|
144
|
+
OpenTelemetryConfig,
|
|
145
|
+
PrometheusConfig,
|
|
146
|
+
)
|
|
147
|
+
|
|
148
|
+
config = CeleryRootConfig(
|
|
149
|
+
logging=LoggingConfigFile(log_dir=Path("./logs")),
|
|
150
|
+
database=DatabaseConfigSqlite(db_path=Path("./celery_root.db")),
|
|
151
|
+
beat=BeatConfig(schedule_path=Path("./celerybeat-schedule")),
|
|
152
|
+
prometheus=PrometheusConfig(port=8001, prometheus_path="/metrics"),
|
|
153
|
+
open_telemetry=OpenTelemetryConfig(endpoint="http://localhost:4317"),
|
|
154
|
+
frontend=FrontendConfig(host="127.0.0.1", port=5555),
|
|
155
|
+
)
|
|
156
|
+
```
|
|
157
|
+
|
|
158
|
+
Components are enabled when their config is provided (set to `None` to disable).
|
|
159
|
+
|
|
160
|
+
The web UI still reads worker import paths from `CELERY_ROOT_WORKERS` (comma-separated).
|
|
161
|
+
|
|
162
|
+
If you need to override settings before Django settings load:
|
|
163
|
+
|
|
164
|
+
```python
|
|
165
|
+
from celery_root.config import set_settings
|
|
166
|
+
|
|
167
|
+
set_settings(config)
|
|
168
|
+
```
|
|
169
|
+
|
|
170
|
+
`BROKER_URL` and `BACKEND_URL` are standard Celery settings used by the demo math worker. The demo text and sleep
|
|
171
|
+
workers use `BROKER2_URL`/`BACKEND2_URL` and `BROKER3_URL`/`BACKEND3_URL` respectively.
|
|
172
|
+
|
|
173
|
+
## Library usage
|
|
174
|
+
|
|
175
|
+
For programmatic use, you can start the supervisor from Python:
|
|
176
|
+
|
|
177
|
+
```python
|
|
178
|
+
from celery_root import CeleryRoot
|
|
179
|
+
|
|
180
|
+
root = CeleryRoot("your_app.celery:app")
|
|
181
|
+
root.run()
|
|
182
|
+
```
|
|
183
|
+
|
|
184
|
+
## MCP server (AI tools)
|
|
185
|
+
|
|
186
|
+
Celery Root ships with an optional MCP server that exposes read-only tools over HTTP.
|
|
187
|
+
It is designed to let MCP clients (Codex CLI, Claude Code, etc.) inspect the Celery Root
|
|
188
|
+
SQLite store safely without write access.
|
|
189
|
+
|
|
190
|
+
How it works:
|
|
191
|
+
|
|
192
|
+
- The MCP server runs as a separate process when `CELERY_ROOT_MCP_ENABLED=1`.
|
|
193
|
+
- Requests are served from the Celery Root SQLite store using a read-only SQLAlchemy engine.
|
|
194
|
+
- Tools include schema discovery, limited SQL querying (SELECT/WITH only), and a
|
|
195
|
+
dashboard stats payload that matches the web UI.
|
|
196
|
+
- Authentication is enforced with a static bearer token (`CELERY_ROOT_MCP_AUTH_KEY`).
|
|
197
|
+
- The web Settings page renders copy/paste snippets for MCP client configuration
|
|
198
|
+
and CLI commands for Codex + Claude.
|
|
199
|
+
|
|
200
|
+
Configuration:
|
|
201
|
+
|
|
202
|
+
- `CELERY_ROOT_MCP_ENABLED`: Enable the MCP server (`1`/`true`).
|
|
203
|
+
- `CELERY_ROOT_MCP_HOST`: Host interface (default: `127.0.0.1`).
|
|
204
|
+
- `CELERY_ROOT_MCP_PORT`: Port (default: `9100`).
|
|
205
|
+
- `CELERY_ROOT_MCP_PATH`: Base path (default: `/mcp/`).
|
|
206
|
+
- `CELERY_ROOT_MCP_AUTH_KEY`: Required auth token for clients.
|
|
207
|
+
- `CELERY_ROOT_MCP_READONLY_DB_URL`: Optional read-only database URL (defaults to
|
|
208
|
+
SQLite read-only mode using `CELERY_ROOT_DB_PATH`). If you provide a regular
|
|
209
|
+
database URL via `CELERY_ROOT_MCP_READONLY_DB_URL`, it is used as-is; ensure
|
|
210
|
+
the credentials are truly read-only or queries will not be protected by the
|
|
211
|
+
database itself.
|
|
212
|
+
|
|
213
|
+
Example:
|
|
214
|
+
|
|
215
|
+
```bash
|
|
216
|
+
export CELERY_ROOT_MCP_ENABLED=1
|
|
217
|
+
export CELERY_ROOT_MCP_AUTH_KEY="your-secret-token"
|
|
218
|
+
```
|
|
219
|
+
|
|
220
|
+
Start the supervisor (or MCP server) and then open the Settings page to grab the
|
|
221
|
+
client config snippets. The page includes JSON config for MCP clients plus CLI
|
|
222
|
+
examples for Codex and Claude.
|
|
223
|
+
|
|
224
|
+
## Development
|
|
225
|
+
|
|
226
|
+
Run checks locally:
|
|
227
|
+
|
|
228
|
+
```bash
|
|
229
|
+
uv run precommit
|
|
230
|
+
```
|
|
231
|
+
|
|
232
|
+
Run tests directly:
|
|
233
|
+
|
|
234
|
+
```bash
|
|
235
|
+
uv run pytest
|
|
236
|
+
```
|
|
237
|
+
|
|
238
|
+
Type checking:
|
|
239
|
+
|
|
240
|
+
```bash
|
|
241
|
+
uv run mypy
|
|
242
|
+
```
|
|
243
|
+
|
|
244
|
+
## Project structure
|
|
245
|
+
|
|
246
|
+
- `celery_root/components/`: optional components (web, metrics, beat).
|
|
247
|
+
- `celery_root/core/`: engine + DB + logging internals.
|
|
248
|
+
- `demo/`: demo workers and task scripts.
|
|
249
|
+
- `tests/`: unit and integration tests.
|