cleanup scheduler

Signed-off-by: Marc 'risson' Schmitt <marc.schmitt@risson.space>
This commit is contained in:
Marc 'risson' Schmitt
2025-06-20 19:01:34 +02:00
parent e634f23fc8
commit 13e1e44626
4 changed files with 11 additions and 14 deletions

View File

@ -405,7 +405,7 @@ class _PostgresConsumer(Consumer):
# Automatically purge messages on average every n iterations.
# We manually set the timeout to 30s, so we need to divide by 30 to
# get the number of actual iterations.
iterations = Conf().task_purge_interval // 30
iterations = int(Conf().task_purge_interval / 30)
if randint(0, iterations): # nosec
return
self.logger.debug("Running garbage collector")