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

* Fixing an error refreshing the workflow #384

Merged
merged 3 commits into from
Oct 19, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions CHANGES.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
V3.0.27
-------
Users:
- Fixing an error refreshing the workflow:
* the protocol status changed intermittently
- "Use queue?" label and help reworded and linked to documentation site
- "Wait for" label and help reworded and linked to documentation site
- Fix: New protocols, without sibilings were wrongly located at the top.
Expand Down
3 changes: 2 additions & 1 deletion pyworkflow/project/project.py
Original file line number Diff line number Diff line change
Expand Up @@ -1394,9 +1394,10 @@ def checkPid(self, protocol):
pid = protocol.getPid()

# Include running and scheduling ones
# Exclude interactive protocols
# NOTE: This may be happening even with successfully finished protocols
# which PID is gone.
if (protocol.isActive() and _runsLocally(protocol)
if (protocol.isActive() and not protocol.isInteractive() and _runsLocally(protocol)
and not protocol.useQueue()
and not pwutils.isProcessAlive(pid)):
protocol.setFailed("Process %s not found running on the machine. "
Expand Down
5 changes: 5 additions & 0 deletions pyworkflow/protocol/protocol.py
Original file line number Diff line number Diff line change
Expand Up @@ -1018,6 +1018,11 @@ def setFailed(self, msg):
super().setFailed(msg)
self._closeOutputSet()

def _finalizeStep(self, status, msg=None):
""" Closes the step and setting up the protocol process id """
super()._finalizeStep(status, msg)
self._pid.set(None)

def _updateSteps(self, updater, where="1"):
"""Set the status of all steps
:parameter updater callback/lambda receiving a step and editing it inside
Expand Down