You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Possible issues: currently some devices have background threads running, e.g., LabmanQuadrant. But this is in general a bad way to handle background tasks as it is hard for debugging purpose.
Device manager is only useful for monitoring state of devices such as glovebox(robotbox) argon flow. Therefore, in the future we will implement a separate thread to do this. I In each device we will have method call “check_status()” to check all parameters if its in the correct range.
Steps:
Package affected:
DeviceManager: /scripts/launch_lab.py
Find all that connects to DeviceManager
DeviceClient: /lab_view.py → NOT GONE, just refactor
Steps to follow:
1. Remove https://github.com/CederGroupHub/alabos/blob/main/alab_management/device_manager.py completely. We will create the instances of devices in each task every time the task occupies the device. (@idocx )
2. Implement reload option for importing alab_one package. Currently, the alab_one package is imported to AlabOS process via https://github.com/CederGroupHub/alabos/blob/main/alab_management/utils/module_ops.py#L12. We will need to implement something similar to
importlib.reloadfunction. The new function should have such signature. (@bernardusrendy )3. Implement process restart for AlabOS. This will be done via https://github.com/CederGroupHub/alabos/blob/main/alab_management/scripts/launch_lab.py#L70. Currently, there are four processes running. We will only need to restart them at a regular interval by adding a
live_timeargument to each manager class, e.g., (@odartsi )Then in the
launch_labfunction, we will need to start them process if it exits normally.