dandi / dandi/dandi-archive

Make use of Celery `delay_on_commit`

Open
#2,006 0 comments 0 reactions 1 assignee Claimed by @jjnesbitt View on GitHub
technical debt zen task
Dominant language
Python
Stars
26
Forks
21
Avg merge
4d 23h
Merged PRs (30d)
15

Description

Celery `5.4` adds the [`DjangoTask.delay_on_commit`](https://docs.celeryq.dev/en/stable/django/first-steps-with-django.html#trigger-tasks-at-the-end-of-the-database-transaction) function, which can be used instead of the following syntax that we currently use in several places:

```python
transaction.on_commit(lambda: task.delay(arg))
```

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.