Skip to content

Commit

Permalink
fix: use all_subclasses utility for message class cache
Browse files Browse the repository at this point in the history
  • Loading branch information
furkan-bilgin committed Dec 6, 2024
1 parent 01cb5af commit b9b2e88
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/enrgdaq/daq/jobs/remote.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
DAQJobConfig,
DAQJobMessage,
)
from enrgdaq.utils.subclasses import all_subclasses
from enrgdaq.utils.time import sleep_for

DAQ_JOB_REMOTE_MAX_REMOTE_MESSAGE_ID_COUNT = 10000
Expand Down Expand Up @@ -115,7 +116,7 @@ def __init__(self, config: DAQJobRemoteConfig, **kwargs):
self._message_class_cache = {}

self._message_class_cache = {
x.__name__: x for x in DAQJobMessage.__subclasses__()
x.__name__: x for x in all_subclasses(DAQJobMessage)
}
self._remote_message_ids = set()
self._remote_stats = defaultdict(lambda: SupervisorRemoteStats())
Expand Down

0 comments on commit b9b2e88

Please sign in to comment.