Skip to main content

Urd is a scheduler for Django projects

Project description

Urd is a scheduler for Django projects. Some features:

  • schedule < 1m time slots

  • single concurrent execution [1]

  • fast enable/disable [2]

  • simple deployment

  • no extra dependencies beyond Django

Setup

  • Install urd pip install urd

  • Add urd to INSTALLED_APPS

  • Run manage.py migrate

  • Start the scheduler with manage.py monitor

Usage

  • Define a tasks.py module in the app that should have tasks.

  • Create a function like this:

@schedulable_task
def my_task(heartbeat):
    for foo in bar:
        heartbeat()
        do_some_task()

Calling heartbeat() regularly is important to make the task cancellable in a timely manner.

Now define a task in the iommi admin. It will be enabled pretty much as soon as you save.

Administration

Urd ships with integration for the iommi admin.

What does urd mean?

Urd (or Urðr, or Wyrd) is one of the Norns, the goddesses who weave the destiny of gods and humans.

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

urd-1.0.2.tar.gz (12.2 kB view hashes)

Uploaded Source

Built Distribution

urd-1.0.2-py2.py3-none-any.whl (15.1 kB view hashes)

Uploaded Python 2 Python 3

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