Skip to content

Commit 200a398

Browse files
Write debug instead of exception after FormulaEngine stop
Replace exception with debug message to avoid confusing traceback output. Previously, FormulaEngine couldn't be stopped, so exception was acceptable. Now that FormulaEngine can be stopped, use severity level 'debug' since stopping is a normal operation and usefull only during debugging. Signed-off-by: Elzbieta Kotulska <[email protected]>
1 parent b38c420 commit 200a398

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/frequenz/sdk/timeseries/formula_engine/_formula_engine.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -313,7 +313,7 @@ async def _run(self) -> None:
313313
try:
314314
msg = await evaluator.apply()
315315
except asyncio.CancelledError:
316-
_logger.exception("FormulaEngine task cancelled: %s", self._name)
316+
_logger.debug("FormulaEngine task cancelled: %s", self._name)
317317
raise
318318
except Exception as err: # pylint: disable=broad-except
319319
_logger.warning(
@@ -582,7 +582,7 @@ async def _run(self) -> None:
582582
phase_3.value,
583583
)
584584
except asyncio.CancelledError:
585-
_logger.exception("FormulaEngine task cancelled: %s", self._name)
585+
_logger.debug("FormulaEngine task cancelled: %s", self._name)
586586
break
587587
else:
588588
await sender.send(msg)

0 commit comments

Comments
 (0)