Skip to content

Commit

Permalink
call periodic tasks after handling tasks
Browse files Browse the repository at this point in the history
  • Loading branch information
stchris committed Jun 6, 2024
1 parent 8dcfab3 commit 2e826c4
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion servicelayer/taskqueue.py
Original file line number Diff line number Diff line change
Expand Up @@ -453,7 +453,6 @@ def process_blocking(self):
"""Blocking worker thread - executes tasks from a queue and periodic tasks"""
while True:
try:
self.periodic()
(task, channel, connection) = self.local_queue.get(timeout=TIMEOUT)
apply_task_context(task, v=self.version)
self.handle(task, channel)
Expand All @@ -463,6 +462,7 @@ def process_blocking(self):
pass
finally:
clear_contextvars()
self.periodic()

def process_nonblocking(self):
"""Non-blocking worker is used for tests only."""
Expand Down

0 comments on commit 2e826c4

Please sign in to comment.