Port details |
- py-celery-singleton Prevent duplicate celery tasks
- 0.3.1 devel
=0 0.3.1Version of this port present on the latest quarterly branch. - Maintainer: dvl@FreeBSD.org
 - Port Added: 2023-05-10 15:00:15
- Last Update: 2023-06-27 19:34:34
- Commit Hash: 3d9a815
- Also Listed In: python
- License: MIT
- WWW:
- https://github.com/steinitzu/celery-singleton
- 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
¦ ¦ ¦ ¦ 
- Manual pages:
- FreshPorts has no man page information for this port.
- pkg-plist: as obtained via:
make generate-plist - There is no configure plist information for this port.
- Dependency lines:
-
- ${PYTHON_PKGNAMEPREFIX}celery-singleton>0:devel/py-celery-singleton@${PY_FLAVOR}
- To install the port:
- cd /usr/ports/devel/py-celery-singleton/ && make install clean
- To add the package, run one of these commands:
- pkg install devel/py-celery-singleton
- pkg install py39-celery-singleton
NOTE: If this package has multiple flavors (see below), then use one of them instead of the name specified above. NOTE: This is a Python port. Instead of py39-celery-singleton listed in the above command, you can pick from the names under the Packages section.- PKGNAME: py39-celery-singleton
- Package flavors (<flavor>: <package>)
- py39: py39-celery-singleton
- distinfo:
- TIMESTAMP = 1683049934
SHA256 (celery-singleton-0.3.1.tar.gz) = 260ce4978e631f8682ea0ccb03d7f3b87d42bc20e04e9bd46ddb78a2f8035d1e
SIZE (celery-singleton-0.3.1.tar.gz) = 4659
Packages (timestamps in pop-ups are UTC):
- Dependencies
- NOTE: FreshPorts displays only information on required and default dependencies. Optional dependencies are not covered.
- Build dependencies:
-
- py39-setuptools>=63.1.0 : devel/py-setuptools@py39
- Runtime dependencies:
-
- py39-redis>0 : databases/py-redis@py39
- py39-setuptools>=63.1.0 : devel/py-setuptools@py39
- python3.9 : lang/python39
- There are no ports dependent upon this port
Configuration Options:
- No options to configure
- Options name:
- devel_py-celery-singleton
- USES:
- python:run
- FreshPorts was unable to extract/find any pkg message
- Master Sites:
|