devel/py-celery-singleton 0.3.1_1 FreeBSD
Prevent duplicate celery tasks
- System
- FreeBSD
- Repository
- FreeBSD ports
- Maintainer
- [email protected]
- License
- MIT
- Categories
- devel, python
- Package size
- 13.0 KiB, 42.7 KiB installed
Description
celery-singleton uses the JSON representation of a task's delay() or apply_async() arguments to generate a unique lock and stores it in redis. By default it uses the redis server of the celery result backend. If you use a different/no result backend or want to use a different redis server for celery-singleton, refer the configuration section for how to customize the redis.
import time from celery_singleton import Singleton from somewhere import celery_app
@celery_app.task(base=Singleton) def do_stuff(*args, **kwargs): time.sleep(4) return 'I just woke up'
# run the task as normal async_result = do_stuff.delay(1, 2, 3, a='b') async_result2 = do_stuff.delay(1, 2, 3, a='b')
# These are the same, task is only queued once assert async_result == async_result2
In the other systems
| System | Port | Version |
|---|---|---|
| FreeBSD | devel/py-celery-singleton | 0.3.1_1 |
| DragonFly | devel/py-celery-singleton | 0.3.1_1 |
Install
Binary package:
pkg install py312-celery-singleton
From the ports tree:
cd /usr/ports/devel/py-celery-singleton/ && make install clean
To depend on this port in another port's Makefile:
RUN_DEPENDS= py312-celery-singleton>0:devel/py-celery-singleton
Packages
The version each package repository carries. “-” means the repository builds no package of it, “n/a” that there is no such repository.
| Repository | aarch64 | amd64 | armv6 | armv7 | i386 |
|---|---|---|---|---|---|
| FreeBSD:14:latest | 0.3.1_1 | 0.3.1_1 | - | 0.3.1_1 | 0.3.1_1 |
| FreeBSD:14:quarterly | 0.3.1_1 | 0.3.1_1 | n/a | 0.3.1_1 | 0.3.1_1 |
| FreeBSD:15:latest | 0.3.1_1 | 0.3.1_1 | n/a | 0.3.1_1 | 0.3.1_1 |
| FreeBSD:15:quarterly | 0.3.1_1 | 0.3.1_1 | n/a | n/a | n/a |
| FreeBSD:16:latest | 0.3.1_1 | 0.3.1_1 | n/a | n/a | n/a |
| FreeBSD:16:quarterly | n/a | n/a | n/a | n/a | n/a |
Dependencies
As this port's Makefile names them.
Runtime 1
${PYTHON_PKGNAMEPREFIX}redis>0: databases/py-redis
The full lists below include those, and their dependencies in turn.
Build dependencies 10
Run dependencies 8
No port depends on this one.
Configuration
No options to configure.
- USES
- python:run
- Service scripts
- none
Files
distinfo 1
| File | Size | SHA256 |
|---|---|---|
| celery-singleton-0.3.1.tar.gz | 4659 | 260ce4978e631f8682ea0ccb03d7f3b87d42bc20e04e9bd46ddb78a2f8035d1e |
Master sites 1
- PYPI
Commit history 0
No commits in the history this site was built from.