mxcube / mxcubecore

Backend used by MXCuBE
http://mxcube.github.io/mxcube/
GNU Lesser General Public License v3.0
11 stars 51 forks source link

Fix generic workflow queue entry execute method #870

Open fhernandezvivanco opened 3 months ago

fhernandezvivanco commented 3 months ago

Resolves #869

marcus-oscarsson commented 3 months ago

This was done before all hardware objects had a standardized state. The proposed change should in theory work for handling the state RUNNING/BUSY however the workflow_state_handler also handles a state called OPEN which means that the workflow requests a dialog to be displayed. I don't think the later is used today (it was used in the Qt interface with EDNA based Workflows).

I think we can try this change but we need to test it properly, and in that case remove the workflow_state_handler method. However if your workflow emits stateChanged then the self.running attribute should be correct, does workflow_state_handler get called at all ?

marcus-oscarsson commented 3 months ago

What Id suggest is, if you feel comfortable with it (it would make the clean up work for me easier) remove the workflow_state_handler and the connect in pre_execute. Like this we have removed this obsolete piece of code and Ill make a note to test this to make sure that the running state is correct in the end.

rhfogh commented 3 months ago

@marcus-oscarsson Your last proposal sounds fine. Anyway, the GPhL workflow does not use this class, so whatever works, ...

marcus-oscarsson commented 3 months ago

@fhernandezvivanco: What did you decide to do, are you going for the cleanup ?

fhernandezvivanco commented 2 months ago

@marcus-oscarsson , sorry for the delay. Happy to clean the class. For some reason I misunderstood and thought you were going for the code cleanup.