Django helpers for celery
Project description
Task
Adds apply_async_on_commit() and delay_on_commit() methods to Task class.
TransactionTask
Class that has run() wrapped in @transaction.atomic.
from django_celery_task_class import Task
from django_celery_task_class import TransactionTask
class MyTask(Task):
def run(self, *args, **kwargs):
pass
class MyTransactionTask(TransactionTask):
def run(self, *args, **kwargs):
# Runs inside a @transaction.atomic
pass
my_task = MyTask.as_task()
my_transaction_task = MyTransactionTask.as_task()
Caller:
from mycode import my_task
my_task.delay_on_commit()
my_transaction_task.apply_async_on_commit()
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
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file django_celery_task_class-0.1.0.tar.gz.
File metadata
- Download URL: django_celery_task_class-0.1.0.tar.gz
- Upload date:
- Size: 1.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/2.1.2 CPython/3.10.14 Darwin/24.6.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
b58dd31e1a3a6faf157e9dd31db1012a098418afd0ddcbe623c9069b57c3963a
|
|
| MD5 |
8945391e095e5f605d17f8be53ab2c1d
|
|
| BLAKE2b-256 |
a24b19cd6d376153ceb2a1003956a2f3512116aca82a8dff0bee0037cddcdd19
|
File details
Details for the file django_celery_task_class-0.1.0-py3-none-any.whl.
File metadata
- Download URL: django_celery_task_class-0.1.0-py3-none-any.whl
- Upload date:
- Size: 2.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/2.1.2 CPython/3.10.14 Darwin/24.6.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
53fde33e79de7c31bfcb8d3b5dd68ae22b3744c10d25accb0a70cca839874863
|
|
| MD5 |
eed8c78ab679b6ec7aaa0e7062624a8d
|
|
| BLAKE2b-256 |
578cea2a9a041aafce874ae51d64b67ede1c51fa6331812364edde4b940528b6
|