Pioreactor / Pioreactor/pioreactor
[what happened] Dosing automation base's has a race condition that doesn't ended the job properly.
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 149
- Forks
- 18
- PR merge metrics
- No merged PRs in 30d
Description
Suppose I have a long-running execute, ex:
def execute(...):
from time import sleep
from pioreactor.actions.pump import remove_waste, add_media
for i in range(10):
add_media(duration=1.0, unit=self.unit, experiment=self.experiment)
sleep(5)
remove_waste(duration=3.0, unit=self.unit, experiment=self.experiment)
return
If I try to stop the dosing_controller job (from the UI) mid-execute, the pumping doesn't stop, and eventually LOST on the controller is thrown. The pumping doesn't stop because the automation_job has a thead.join() in it's on_disconnected.
Users should put in logic to check for state here, but does this also happen for our execute_io_action?
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start at automation_job.on_disconnected and its thread.join() behavior, then compare it with execute_io_action. Reproduce the issue by stopping a long-running execute from the UI; done means the pumping stops and the job ends without the controller reporting LOST.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- embedded-iot
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100