From 8f644c3d3ac2c08cd07382a9e40ea8f98642da8c Mon Sep 17 00:00:00 2001 From: Marc 'risson' Schmitt Date: Thu, 2 Oct 2025 14:45:56 +0200 Subject: [PATCH] packages/django-dramatiq-postgres: broker: fix task expiration (#17178) --- .../django-dramatiq-postgres/django_dramatiq_postgres/broker.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/django-dramatiq-postgres/django_dramatiq_postgres/broker.py b/packages/django-dramatiq-postgres/django_dramatiq_postgres/broker.py index 35aa8cd7ff..5c283610a1 100644 --- a/packages/django-dramatiq-postgres/django_dramatiq_postgres/broker.py +++ b/packages/django-dramatiq-postgres/django_dramatiq_postgres/broker.py @@ -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)