{"categories":[{"label":"Distributed Computing","url":"https://skillfed.io/packages/category/system-distributed-computing/2"}],"enrichment":{"capability":"Prevents duplicate Celery tasks from being queued or running simultaneously by using task name and arguments to determine uniqueness, with Redis-backed distributed locking.","skillfed_tags":["celery-task-deduplication","distributed-locking","abandoned-maintenance"],"use_cases":["Prevent duplicate long-running reports or data exports from queuing when users click submit multiple times","Ensure only one instance of a periodic cleanup or maintenance task runs at a time across distributed workers","Rate-limit task execution by argument (e.g., one sync per user) without time-based delays","Protect against thundering herd problems when multiple services trigger the same background job","Simplify task deduplication logic by inheriting from Singleton instead of manual lock management"],"what_it_does":"Celery-Singleton is a base class for Celery tasks that enforces at-most-one-instance semantics: when you call delay() or apply_async() on a singleton task, it either queues a new task or returns the AsyncResult of an already-queued or running task with identical name and arguments. It uses Redis-backed distributed locking with task name and arguments hashed as the lock key, preventing duplicate work from clogging your message broker.\n\nThe package works transparently with standard Celery\u2014no special exception handling needed. Locks are held until the task completes (success or failure), then released. You can configure which arguments determine uniqueness via the unique_on parameter, set lock expiry times to handle worker crashes, or raise exceptions on duplicate attempts instead of returning existing results. It requires a Redis server and JSON-serializable task arguments.","worth_installing":"Yes, if you are already committed to Celery and Redis and need simple deduplication without custom locking logic. However, proceed with caution: the package is abandoned (last release 2021-01-14, last commit 2023-06-09), so compatibility with recent Celery versions is unverified and no bug fixes are forthcoming. Evaluate whether a maintained fork or alternative exists before adopting for new projects."},"id":"celery-singleton","links":{"html":"https://skillfed.io/packages/celery-singleton","md":"https://skillfed.io/packages/celery-singleton.md","pypi":"https://pypi.org/project/celery-singleton/"},"maintenance":{"status":"abandoned"},"meta":{"latest_release":"2021-01-14","license_spdx":null,"license_treatment":"permissive","name":"celery-singleton","python_support":"supports_current","summary":"Prevent duplicate celery tasks"},"popularity":{"monthly_downloads":352762,"position":7310,"tier":"top_15000"},"security":{"n_vulnerabilities":0},"version":"0.3.1"}
