Celery beat scheduler with redundency
Project description
# celery-redundant-scheduler
[Celery](http://celeryproject.org) beat scheduler providing ability to run multiple `celerybeat` instances.
# Problem
Production level deployment requires redundancy and fault-tolerance environment. Unfortunately [Celery](http://celeryproject.org) doesn't provide periodic tasks scheduling redundancy out of the box. Running multiple `celerybeat` instances results multiple scheduled tasks queuing. This package provides synchronized scheduler class. By default `redis` backend used, but developers are free too use their own based on package primitives.
# Installation
```#bash
pip install celery-redundant-scheduler
pip install git+https://github.com/MnogoByte/celery-redundant-scheduler.git
```
# Usage
1. Setup scheduler synchronization backend:
```
CELERYBEAT_REDUNDANT_BACKEND_OPTIONS = {
'HOST': 'localhost',
'PORT': 6379,
'DB': 0,
'PASSWORD': 'secret'
}
```
2. Provide `--scheduler=celery_redundant_scheduler:RedundantScheduler` option running your `worker` or `beat` instance.
# Settings
- `CELERYBEAT_REDUNDANT_BACKEND_OPTIONS` - redis connection options.
- `CELERYBEAT_REDUNDANT_REDIS_KEYPREFIX` - prefix for redis keys. Default is `redundant-scheduler`.
- `CELERYBEAT_REDUNDANT_REDIS_LOCK_EXPIRES` - redis lock timeout. Default is 60 seconds.
# Using custom scheduler synchronization backend
1. Define subclass of `celery_redundant_scheduler.backends.base:BaseBackend`.
2. Override back-end interaction methods.
3. Provide backend options with `CELERYBEAT_REDUNDANT_BACKEND_OPTIONS`
4. Claim using your subclass providing `CELERYBEAT_REDUNDANT_BACKEND` setting or environment variable.
# Author
[Antonov Mikhail](https://github.com/atin65536)
# License
BSD - 3
[Celery](http://celeryproject.org) beat scheduler providing ability to run multiple `celerybeat` instances.
# Problem
Production level deployment requires redundancy and fault-tolerance environment. Unfortunately [Celery](http://celeryproject.org) doesn't provide periodic tasks scheduling redundancy out of the box. Running multiple `celerybeat` instances results multiple scheduled tasks queuing. This package provides synchronized scheduler class. By default `redis` backend used, but developers are free too use their own based on package primitives.
# Installation
```#bash
pip install celery-redundant-scheduler
pip install git+https://github.com/MnogoByte/celery-redundant-scheduler.git
```
# Usage
1. Setup scheduler synchronization backend:
```
CELERYBEAT_REDUNDANT_BACKEND_OPTIONS = {
'HOST': 'localhost',
'PORT': 6379,
'DB': 0,
'PASSWORD': 'secret'
}
```
2. Provide `--scheduler=celery_redundant_scheduler:RedundantScheduler` option running your `worker` or `beat` instance.
# Settings
- `CELERYBEAT_REDUNDANT_BACKEND_OPTIONS` - redis connection options.
- `CELERYBEAT_REDUNDANT_REDIS_KEYPREFIX` - prefix for redis keys. Default is `redundant-scheduler`.
- `CELERYBEAT_REDUNDANT_REDIS_LOCK_EXPIRES` - redis lock timeout. Default is 60 seconds.
# Using custom scheduler synchronization backend
1. Define subclass of `celery_redundant_scheduler.backends.base:BaseBackend`.
2. Override back-end interaction methods.
3. Provide backend options with `CELERYBEAT_REDUNDANT_BACKEND_OPTIONS`
4. Claim using your subclass providing `CELERYBEAT_REDUNDANT_BACKEND` setting or environment variable.
# Author
[Antonov Mikhail](https://github.com/atin65536)
# License
BSD - 3
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
File details
Details for the file celery-redundant-scheduler-0.0.1.tar.gz
.
File metadata
- Download URL: celery-redundant-scheduler-0.0.1.tar.gz
- Upload date:
- Size: 4.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | c1db78588279c1d12214155b824c22deeafb6ca26ab0743e5bd185158583a8ac |
|
MD5 | 7d9296ab215ba979dcfa0aa27c15bbbe |
|
BLAKE2b-256 | 57e75c3e89e09a44690707e232ca5ce2dde5b5ae64bc67f0a33c6fc3eb1b9c87 |