Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Restart workers patch with fixes #243

Merged
merged 10 commits into from
Jan 22, 2025
4 changes: 3 additions & 1 deletion modules/cluster_estimation/cluster_estimation_worker.py
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,9 @@ def cluster_estimation_worker(

for single_input in input_data:
if not isinstance(single_input, detection_in_world.DetectionInWorld):
local_logger.warning(f"Skipping unexpected input: {input}")
local_logger.warning(
f"Skipping unexpected input: {input_data}, because of unexpected value: {single_input}"
)
is_invalid = True
break

Expand Down
4 changes: 3 additions & 1 deletion modules/communications/communications_worker.py
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,9 @@ def communications_worker(

for single_input in input_data:
if not isinstance(single_input, object_in_world.ObjectInWorld):
local_logger.warning(f"Skipping unexpected input: {input}")
local_logger.warning(
f"Skipping unexpected input: {input_data}, because of unexpected value: {single_input}"
)
is_invalid = True
break

Expand Down
2 changes: 1 addition & 1 deletion modules/detect_target/detect_target_worker.py
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ def detect_target_worker(
break

if not isinstance(input_data, image_and_time.ImageAndTime):
local_logger.warning(f"Skipping unexpected input: {input}")
local_logger.warning(f"Skipping unexpected input: {input_data}")
continue

result, value = detector.run(input_data)
Expand Down
2 changes: 1 addition & 1 deletion modules/geolocation/geolocation_worker.py
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ def geolocation_worker(
break

if not isinstance(input_data, merged_odometry_detections.MergedOdometryDetections):
local_logger.warning(f"Skipping unexpected input: {input}")
local_logger.warning(f"Skipping unexpected input: {input_data}")
continue

result, value = locator.run(input_data)
Expand Down
7 changes: 0 additions & 7 deletions utilities/workers/worker_manager.py
Original file line number Diff line number Diff line change
Expand Up @@ -244,11 +244,4 @@ def check_and_restart_dead_workers(self) -> bool:

self.__workers = new_workers

# Draining the preceding queue ensures that the preceding queue data wasn't what
# caused the worker to fail. Draining the succeeding queues is not needed
# because a worker that died would not have put bad data into the queue.
# input_queues = self.__worker_properties.get_input_queues()
# for queue in input_queues:
# queue.drain_queue()
Adityya-K marked this conversation as resolved.
Show resolved Hide resolved

return True
Loading