[ui] Force nodes' status update before performing a submit/compute/delete

This ensures that each node's status is correct before being computed,
submitted, or before having its data deleted. This is especially useful
when the File Poller is in minimal node, and only monitors the nodes that
are currently submitted or running.

If a graph is being opened in two different instances of Meshroom, and
computations are started on it in one of the instances, the other one will
not be aware of it (as the signals indicating computations have started
will have been emitted in the first instance, so no chunk will be added
to the monitoring in the second one). By forcing the update of the statuses
before actually starting computations or deleting data, we ensure that
there will not be any computational conflicts (same nodes submitted twice
in farm, for example) and that the users can know at all times what they
are doing without manually triggering a refresh.

This is not critical for the "Delete Data" part, as the action can already
be triggered even with there is no data to delete, but is still useful
to keep the displayed nodes as up-to-date with their actual status as
possible.
This commit is contained in:
Candice Bentéjac 2023-03-02 19:13:00 +01:00
parent 5bc269bfda
commit 614f831457
2 changed files with 9 additions and 2 deletions

View file

@ -529,6 +529,7 @@ Item {
} }
function showConfirmationDialog(deleteFollowing) { function showConfirmationDialog(deleteFollowing) {
uigraph.forceNodesStatusUpdate();
var obj = deleteDataDialog.createObject(root, var obj = deleteDataDialog.createObject(root,
{ {
"node": nodeMenu.currentNode, "node": nodeMenu.currentNode,

View file

@ -1090,8 +1090,14 @@ ApplicationWindow {
_reconstruction.setActiveNode(node); _reconstruction.setActiveNode(node);
workspaceView.viewNode(node, mouse); workspaceView.viewNode(node, mouse);
} }
onComputeRequest: computeManager.compute(node) onComputeRequest: {
onSubmitRequest: computeManager.submit(node) _reconstruction.forceNodesStatusUpdate();
computeManager.compute(node)
}
onSubmitRequest: {
_reconstruction.forceNodesStatusUpdate();
computeManager.submit(node)
}
} }
TaskManager { TaskManager {