Skip to content

Commit 2294bfe

Browse files
author
Andrei Neagu
committed
pylint
1 parent d720750 commit 2294bfe

File tree

2 files changed

+23
-15
lines changed

2 files changed

+23
-15
lines changed

services/dynamic-sidecar/src/simcore_service_dynamic_sidecar/modules/attribute_monitor/_logging_event_handler.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -76,12 +76,12 @@ def _stop_process(self) -> None:
7676
logging.DEBUG,
7777
f"{_LoggingEventHandlerProcess.__name__} stop_process",
7878
):
79-
self._stop_queue.put(None)
79+
self._stop_queue.put(None) # pylint:disable=no-member
8080

8181
if self._process:
8282
# force stop the process
83-
self._process.kill()
84-
self._process.join()
83+
self._process.kill() # pylint:disable=no-member
84+
self._process.join() # pylint:disable=no-member
8585
self._process = None
8686

8787
# cleanup whatever remains
@@ -109,7 +109,7 @@ def _process_worker(self) -> None:
109109
)
110110
observer.start()
111111

112-
while self._stop_queue.qsize() == 0:
112+
while self._stop_queue.qsize() == 0: # pylint:disable=no-member
113113
# NOTE: watchdog handles events internally every 1 second.
114114
# While doing so it will block this thread briefly.
115115
# Health check delivery may be delayed.
@@ -171,7 +171,7 @@ async def _health_worker(self) -> None:
171171
heart_beat_count = 0
172172
while True:
173173
try:
174-
self._health_check_queue.get_nowait()
174+
self._health_check_queue.get_nowait() # pylint:disable=no-member
175175
heart_beat_count += 1
176176
except Empty:
177177
break

services/dynamic-sidecar/src/simcore_service_dynamic_sidecar/modules/outputs/_event_handler.py

Lines changed: 18 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -103,12 +103,12 @@ def stop_process(self) -> None:
103103
with log_context(
104104
_logger, logging.DEBUG, f"{_EventHandlerProcess.__name__} stop_process"
105105
):
106-
self._stop_queue.put(None)
106+
self._stop_queue.put(None) # pylint:disable=no-member
107107

108108
if self._process:
109109
# force stop the process
110-
self._process.kill()
111-
self._process.join()
110+
self._process.kill() # pylint:disable=no-member
111+
self._process.join() # pylint:disable=no-member
112112
self._process = None
113113

114114
# cleanup whatever remains
@@ -123,8 +123,10 @@ def shutdown(self) -> None:
123123
self.stop_process()
124124

125125
# signal queue observers to finish
126-
self.outputs_context.port_key_events_queue.put(None)
127-
self.health_check_queue.put(None)
126+
self.outputs_context.port_key_events_queue.put(
127+
None
128+
) # pylint:disable=no-member
129+
self.health_check_queue.put(None) # pylint:disable=no-member
128130

129131
def _thread_worker_update_outputs_port_keys(self) -> None:
130132
# NOTE: runs as a thread in the created process
@@ -133,7 +135,9 @@ def _thread_worker_update_outputs_port_keys(self) -> None:
133135
while True:
134136
message: dict[
135137
str, Any
136-
] | None = self.outputs_context.file_system_event_handler_queue.get()
138+
] | None = (
139+
self.outputs_context.file_system_event_handler_queue.get() # pylint:disable=no-member
140+
)
137141
_logger.debug("received message %s", message)
138142

139143
# no more messages quitting
@@ -173,7 +177,7 @@ def _process_worker(self) -> None:
173177
)
174178
observer.start()
175179

176-
while self._stop_queue.qsize() == 0:
180+
while self._stop_queue.qsize() == 0: # pylint:disable=no-member
177181
# watchdog internally uses 1 sec interval to detect events
178182
# sleeping for less is useless.
179183
# If this value is bigger then the DEFAULT_OBSERVER_TIMEOUT
@@ -183,7 +187,9 @@ def _process_worker(self) -> None:
183187
# time while handling inotify events
184188
# the health_check sending could be delayed
185189

186-
self.health_check_queue.put(_HEART_BEAT_MARK)
190+
self.health_check_queue.put( # pylint:disable=no-member
191+
_HEART_BEAT_MARK
192+
)
187193
blocking_sleep(self.heart_beat_interval_s)
188194

189195
except Exception: # pylint: disable=broad-except
@@ -196,7 +202,9 @@ def _process_worker(self) -> None:
196202
observer.stop()
197203

198204
# stop created thread
199-
self.outputs_context.file_system_event_handler_queue.put(None)
205+
self.outputs_context.file_system_event_handler_queue.put( # pylint:disable=no-member
206+
None
207+
)
200208
thread_update_outputs_port_keys.join()
201209

202210
_logger.warning("%s exited", _EventHandlerProcess.__name__)
@@ -246,7 +254,7 @@ async def _health_worker(self) -> None:
246254
heart_beat_count = 0
247255
while True:
248256
try:
249-
self._health_check_queue.get_nowait()
257+
self._health_check_queue.get_nowait() # pylint:disable=no-member
250258
heart_beat_count += 1
251259
except Empty:
252260
break

0 commit comments

Comments
 (0)