Skip to main content

Simple Scheduler for Dramatiq Task Queue

Project description

Simple Scheduler for Dramatiq Task Queue

dramatiq task queue is great but lake a scheduler. This project fills the gap.

Features

  • Cron-like scheduling.
  • Single process.
  • Fast and simple implementation.
  • Easy on ressources using SIGALRM.
  • No dependency except dramatiq ones.
  • CLI consistent with dramatiq.
  • Skip outdated message.

Installation

periodiq is licensed under LGPL 3.0+.

$ pip install periodiq

Declare periodic tasks like this:

# filename: app.py

import dramatiq
from periodiq import PeriodiqMiddleWare, cron

broker.add_middleware(PeriodiqMiddleWare(skip_delay=30))

@dramatiq.actor(periodic=cron('0 * * * *))
def hourly():
    # Do something each hour…
    ...

Then, run scheduler with:

$ periodiq -v app
[INFO] Starting Periodiq, a simple scheduler for Dramatiq.
[INFO] Registered periodic actors:
[INFO]
[INFO]     m h dom mon dow          module:actor@queue
[INFO]     ------------------------ ------------------
[INFO]     0 * * * *                app:hourly@default
[INFO]
...

Support

If you need help or found a bug, mind opening a GitLab issue on the project. French and English spoken.

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

periodiq-0.12.1.tar.gz (6.5 kB view details)

Uploaded Source

Built Distribution

periodiq-0.12.1-py3-none-any.whl (6.7 kB view details)

Uploaded Python 3

File details

Details for the file periodiq-0.12.1.tar.gz.

File metadata

  • Download URL: periodiq-0.12.1.tar.gz
  • Upload date:
  • Size: 6.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.0.0b1 CPython/3.6.8 Linux/4.19.0-5-amd64

File hashes

Hashes for periodiq-0.12.1.tar.gz
Algorithm Hash digest
SHA256 b849b04c47e3daa22fdf9fad87804255ff84aa9831f5b690fa1374d254a77cf9
MD5 5ca904df613c619858ffa4de95965a00
BLAKE2b-256 9ba0d87974527c195078978b00d6f446fc35a0714d2ee8f7afbb3d94ab3255f5

See more details on using hashes here.

Provenance

File details

Details for the file periodiq-0.12.1-py3-none-any.whl.

File metadata

  • Download URL: periodiq-0.12.1-py3-none-any.whl
  • Upload date:
  • Size: 6.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.0.0b1 CPython/3.6.8 Linux/4.19.0-5-amd64

File hashes

Hashes for periodiq-0.12.1-py3-none-any.whl
Algorithm Hash digest
SHA256 217650fd42d8966311144d387dfa888c3045fb6aee7e31338db5a6bd221cec13
MD5 ef8d606e68978a2c844a68d5ecfe17d5
BLAKE2b-256 338950e6c27d950f481dbf6a5748741320060c7d4c47b1486c628777c919d015

See more details on using hashes here.

Provenance

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page