Skip to content

Commit

Permalink
avoid iteration over sets (PLC0208)
Browse files Browse the repository at this point in the history
  • Loading branch information
helylle committed Dec 6, 2024
1 parent bf0cff1 commit 950d80d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/eduid/queue/workers/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ async def run(self) -> None:
main_task = asyncio.create_task(self.run_subtasks(), name="run subtasks")
# set up signal handling to be a well behaved service
loop = asyncio.get_running_loop()
for signame in {"SIGINT", "SIGTERM"}:
for signame in ("SIGINT", "SIGTERM"):
loop.add_signal_handler(getattr(signal, signame), functools.partial(cancel_task, signame, main_task))

logger.info(f"Running: {main_task.get_name()}")
Expand Down

0 comments on commit 950d80d

Please sign in to comment.