mirror of
https://github.com/goauthentik/authentik.git
synced 2026-06-17 19:09:11 +03:00
packages/django-dramatiq-postgres: broker: fix task expiration (#17178)
This commit is contained in:
committed by
GitHub
parent
40811eabc9
commit
8f644c3d3a
@@ -465,7 +465,7 @@ class _PostgresConsumer(Consumer):
|
||||
self.logger.debug("Running garbage collector")
|
||||
count = self.query_set.filter(
|
||||
state__in=(TaskState.DONE, TaskState.REJECTED),
|
||||
mtime__lte=timezone.now() - timedelta(seconds=Conf().task_purge_interval),
|
||||
mtime__lte=timezone.now() - timedelta(seconds=Conf().task_expiration),
|
||||
result_expiry__lte=timezone.now(),
|
||||
).delete()
|
||||
self.logger.info("Purged messages in all queues", count=count)
|
||||
|
||||
Reference in New Issue
Block a user