Don't close DB connection if async_task was called with sync=True (#301)

This commit is contained in:
Seba
2026-03-12 15:33:19 +01:00
committed by GitHub
parent 573b8da528
commit 01df35c923
2 changed files with 4 additions and 2 deletions
+2 -1
View File
@@ -93,7 +93,8 @@ def save_task(task, broker: Broker):
broker=broker,
)
# SAVE LIMIT > 0: Prune database, SAVE_LIMIT 0: No pruning
close_old_django_connections()
if not task.get("sync", False):
close_old_django_connections()
try:
filters = {}