mirror of
https://github.com/pretix/pretix.git
synced 2026-05-05 15:14:04 +00:00
Use transaction aware task for regenerate_css
This commit is contained in:
@@ -106,3 +106,15 @@ class TransactionAwareTask(ProfiledTask):
|
||||
transaction.on_commit(
|
||||
lambda: super(TransactionAwareTask, self).apply_async(*args, **kwargs)
|
||||
)
|
||||
|
||||
|
||||
class TransactionAwareProfiledEventTask(ProfiledEventTask):
|
||||
|
||||
def apply_async(self, *args, **kwargs):
|
||||
"""
|
||||
Unlike the default task in celery, this task does not return an async
|
||||
result
|
||||
"""
|
||||
transaction.on_commit(
|
||||
lambda: super(TransactionAwareProfiledEventTask, self).apply_async(*args, **kwargs)
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user