Skip to content

Commit 9cbba41

Browse files
fix led intensity to check active
1 parent 308e478 commit 9cbba41

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

pioreactor/actions/led_intensity.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@
2222
from pioreactor.utils.timing import current_utc_datetime
2323
from pioreactor.whoami import get_assigned_experiment_name
2424
from pioreactor.whoami import get_unit_name
25+
from pioreactor.whoami import is_active
2526
from pioreactor.whoami import is_testing_env
2627

2728
ALL_LED_CHANNELS: list[LedChannel] = ["A", "B", "C", "D"]
@@ -135,6 +136,9 @@ def led_intensity(
135136
unit = unit or get_unit_name()
136137
experiment = experiment or get_assigned_experiment_name(unit)
137138

139+
if not is_active(unit):
140+
return False
141+
138142
logger = create_logger("led_intensity", experiment=experiment, unit=unit, pub_client=pubsub_client)
139143
updated_successfully = True
140144

0 commit comments

Comments
 (0)