Skip to content
Snippets Groups Projects
Commit 70b5c691 authored by Benjamin Schubert's avatar Benjamin Schubert
Browse files

Don't update state before summary. It should be consistent

Since we know when an object's state can change, we don't need
to update the state of all objects for consistency.
parent e239d3eb
No related branches found
No related tags found
Loading
Pipeline #45283726 passed
......@@ -28,7 +28,7 @@ import tarfile
import tempfile
from contextlib import contextmanager, suppress
from ._exceptions import StreamError, ImplError, BstError, set_last_task_error
from ._exceptions import StreamError, ImplError, BstError
from ._message import Message, MessageType
from ._scheduler import Scheduler, SchedStatus, TrackQueue, FetchQueue, BuildQueue, PullQueue, PushQueue
from ._pipeline import Pipeline, PipelineSelection
......@@ -1066,17 +1066,6 @@ class Stream():
_, status = self._scheduler.run(self.queues)
# Force update element states after a run, such that the summary
# is more coherent
try:
for element in self.total_elements:
element._update_state()
except BstError as e:
self._message(MessageType.ERROR, "Error resolving final state", detail=str(e))
set_last_task_error(e.domain, e.reason)
except Exception as e: # pylint: disable=broad-except
self._message(MessageType.BUG, "Unhandled exception while resolving final state", detail=str(e))
if status == SchedStatus.ERROR:
raise StreamError()
elif status == SchedStatus.TERMINATED:
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment