Skip to main content

z4j Celery-beat scheduler adapter (Apache 2.0)

Project description

z4j-celerybeat

PyPI version Python License

License: Apache 2.0 Status: v1.0.0 — first public release.

The Celery-Beat scheduler adapter for z4j. Surfaces periodic / crontab / one-shot schedules on the dashboard's Schedules page — read, create, update, enable, disable, trigger-now, delete.

Supports both of Celery's scheduling backends:

  • app.conf.beat_schedule (static config in Python)
  • django_celery_beat.models.PeriodicTask (database-backed, dynamic)

Install

pip install z4j-celery z4j-celerybeat

What it ships on day 1

Capability Status
List schedules
Read individual schedule by id
Create new schedule
Update (interval, crontab, args, kwargs, enabled flag)
Enable / disable
Trigger-now (fire the task immediately outside the schedule)
Delete
Live sync for django-celery-beat ✅ (via post_save signal on PeriodicTask)

Configure

With django-celery-beat (Django projects)

# settings.py
INSTALLED_APPS = [
    # ...
    "django_celery_beat",
    "z4j_django",
]
# The z4j-celerybeat adapter is auto-registered when django_celery_beat
# is on INSTALLED_APPS.

The Schedules page picks up every PeriodicTask row immediately. Edits flow both ways — dashboard changes are written through to the database, and changes written directly to the model surface via signals.

With static beat_schedule (non-Django or plain Celery)

# celery_app.py
from celery import Celery
from z4j_bare import install_agent
from z4j_celery import CeleryEngineAdapter
from z4j_celerybeat import CeleryBeatAdapter

app = Celery("myproject", broker="redis://localhost")
app.conf.beat_schedule = {
    "cleanup-every-5-minutes": {
        "task": "myapp.tasks.cleanup",
        "schedule": 300.0,
    },
}

install_agent(
    engines=[CeleryEngineAdapter(celery_app=app)],
    schedulers=[CeleryBeatAdapter(celery_app=app)],
    brain_url="https://z4j.internal",
    token="z4j_agent_...",
    project_id="my-project",
)

Static beat_schedule is read-only by design — you can view, enable, disable, and trigger-now, but create / update / delete are rejected because those changes would need to round-trip through a deploy. The dashboard hides buttons it can't honor.

Reliability

  • No exception from the adapter propagates to Celery Beat or Django request handlers.
  • post_save signal handlers for PeriodicTask are wrapped in a top- level try/except — even if the brain is unreachable, the database write is never affected.

Documentation

License

Apache 2.0 — see LICENSE.

Links

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

z4j_celerybeat-1.0.0.tar.gz (24.1 kB view details)

Uploaded Source

Built Distribution

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

z4j_celerybeat-1.0.0-py3-none-any.whl (21.1 kB view details)

Uploaded Python 3

File details

Details for the file z4j_celerybeat-1.0.0.tar.gz.

File metadata

  • Download URL: z4j_celerybeat-1.0.0.tar.gz
  • Upload date:
  • Size: 24.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.8

File hashes

Hashes for z4j_celerybeat-1.0.0.tar.gz
Algorithm Hash digest
SHA256 5ba8632cc582c594e737b5a5472ddbf5095df5789f95355f238629c0e9cb3f9f
MD5 b085cec02dbfcc0bc81170a647c33a36
BLAKE2b-256 d274d3b3c346d6f2b66eb9a44f7298229dac0f8ec9a0fffa4bd1f134f4e8201f

See more details on using hashes here.

File details

Details for the file z4j_celerybeat-1.0.0-py3-none-any.whl.

File metadata

  • Download URL: z4j_celerybeat-1.0.0-py3-none-any.whl
  • Upload date:
  • Size: 21.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.8

File hashes

Hashes for z4j_celerybeat-1.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 a7d25f1a01506d1c29b5a96d5fed9a1953ef451b6c9f997536170840da01ff0c
MD5 86551109f538aa8a2c4ec0ba8dac22ba
BLAKE2b-256 c50e6189a480fbeaf4392de8c44f56382b350bdf10df06dd18b80298b4f4fd4f

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