Skip to content
This repository has been archived by the owner on Mar 13, 2024. It is now read-only.
/ CeleryStore Public archive

Backend agnostic Periodic Task Store for Celery

License

Notifications You must be signed in to change notification settings

fuhrysteve/CeleryStore

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Celery Store: Backend agnostic Periodic Task Store

Build Status Coverage Status

The Problem

The Celery Beat scheduler, by default, needs to be hard coded into your celery configuration. Further, changing this configuration without restarting celery beat can be a non-trivial operation.

Django-celery solves this problem for folks who use django, but not everyone who uses celery also uses django.

Enter Celery Store

Celery Store is intended for folks who want to store their periodic tasks in a database (or whatever backend you choose to implement), but do not want to use django. However if you are using Django, you can absolutely use this as well! Celery Store makes no assumptions.

Celery Store's only dependency is the celery standard library.

Installation and Getting Started

pip install -e 'git+git@github.com:fuhrysteve/CeleryStore.git@master#egg=celery_store'

Celery Store can be adapted to fit any sort of data store. It makes no assumptions about your backend, but may in the future include optional extras for common libraries such as SQLAlchemy, Django, etc.

PeriodicTaskMixin and TaskScheduleMixin provide all the required abstract methods that CeleryStore and celery beat need to do their job.

You need to extend and implement these two mixins, and tell CeleryStore where they are by putting these two configurations in your celery config:

CELERYSTORE_PERIODIC_TASK='example.PeriodicTask'
CELERYSTORE_TASK_SCHEDULE='example.TaskSchedule'

Then, you simply need to run celery beat with the CeleryStore scheduler:

celery beat -S celery_store.scheduler.StoreScheduler

That's it!

Example

See example

About

Backend agnostic Periodic Task Store for Celery

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages