Skip to content

Commit

Permalink
Rewrite Engine.progress().
Browse files Browse the repository at this point in the history
Try to make the code more readable and move specific concerns (e.g.,
counting) into own sub-class.

In particular, tasks are now kept in queues so execution order should
be predictable.
  • Loading branch information
riccardomurri committed Mar 8, 2018
1 parent 0ef8567 commit 03ce2e2
Show file tree
Hide file tree
Showing 3 changed files with 621 additions and 517 deletions.
6 changes: 0 additions & 6 deletions gc3libs/__init__.py
Expand Up @@ -1898,12 +1898,6 @@ def fset(self, value):
self.history.append(
"Transition from state {0} to state {1}"
.format(self._state, value))
# update stats on controller -- we need to do this
# *after* the `.terminated()` method has gotten a
# chance to run and set the final exitcode.
if self._ref is not None and self._ref._attached:
self._ref._controller._update_task_counts(self._ref, self._state, -1)
self._ref._controller._update_task_counts(self._ref, value, +1)
# finally, update state
self._state = value

Expand Down

0 comments on commit 03ce2e2

Please sign in to comment.