mirror of
https://github.com/django-q2/django-q2.git
synced 2026-10-07 20:08:11 +08:00
Don't close DB connection if async_task was called with sync=True (#301)
This commit is contained in:
+2
-1
@@ -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 = {}
|
||||
|
||||
Reference in New Issue
Block a user