Skip to content

Commit 4546b09

Browse files
Merge pull request ceph#60008 from rishabh-d-dave/mgr-util-improve
mgr/mgr_util: improvements for RTimer Reviewed-by: Patrick Donnelly <[email protected]> Reviewed-by: Venky Shankar <[email protected]>
2 parents 0aa4438 + b96d714 commit 4546b09

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

src/pybind/mgr/mgr_util.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@
2222
from ipaddress import ip_address
2323
from threading import Lock, Condition
2424
from typing import no_type_check, NewType
25+
from traceback import format_exc as tb_format_exc
2526
import urllib
2627
from functools import wraps
2728
if sys.version_info >= (3, 3):
@@ -88,9 +89,9 @@ def run(self):
8889
while not self.finished.is_set():
8990
self.finished.wait(self.interval)
9091
self.function(*self.args, **self.kwargs)
91-
self.finished.set()
92-
except Exception as e:
93-
logger.error("task exception: %s", e)
92+
except Exception:
93+
logger.error(f'exception encountered in RTimer instance "{self}":'
94+
f'\n{tb_format_exc()}')
9495
raise
9596

9697

0 commit comments

Comments
 (0)