-
-
Notifications
You must be signed in to change notification settings - Fork 748
Closed
Labels
bugSomething is brokenSomething is broken
Description
running len(logging.getLogger("distributed.worker").handlers) shows a few thousand DequeHandler instances in there.
This means that logging messages from the worker or adding handlers to the worker gradually gets slower and slower as the test suite progresses.
the handlers are supposed to be cleared when the worker is GC'd by
distributed/distributed/node.py
Line 88 in 1da5199
| weakref.finalize(self, logger.removeHandler, self._deque_handler) |
distributed/distributed/utils.py
Lines 1131 to 1142 in 1da5199
| @functools.lru_cache(None) | |
| def _iscoroutinefunction_cached(f): | |
| return _iscoroutinefunction(f) | |
| def iscoroutinefunction(f): | |
| # Attempt to use lru_cache version and fall back to non-cached version if needed | |
| try: | |
| return _iscoroutinefunction_cached(f) | |
| except TypeError: # unhashable type | |
| return _iscoroutinefunction(f) | |
Metadata
Metadata
Assignees
Labels
bugSomething is brokenSomething is broken
