X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=src%2Fnepi%2Fexecution%2Fec.py;h=58ece229e25b4fe8076376c46587806c607a2742;hb=d8144cd833c3a8e82d9580655787b491e768e4f8;hp=2e573dd91f0da821b7fb6df0ec4c974e973bc07f;hpb=cb816db417dff4d0f985455c1d7cbd261fd40f9b;p=nepi.git diff --git a/src/nepi/execution/ec.py b/src/nepi/execution/ec.py index 2e573dd9..58ece229 100644 --- a/src/nepi/execution/ec.py +++ b/src/nepi/execution/ec.py @@ -90,7 +90,8 @@ class ECState(object): """ RUNNING = 1 FAILED = 2 - TERMINATED = 3 + RELEASED = 3 + TERMINATED = 4 class ExperimentController(object): """ @@ -1033,6 +1034,9 @@ class ExperimentController(object): :type guids: list """ + if self._state == ECState.RELEASED: + return + if isinstance(guids, int): guids = [guids] @@ -1050,7 +1054,10 @@ class ExperimentController(object): for guid in guids: if self.get(guid, "hardRelease"): - self.remove_resource(guid) + self.remove_resource(guid)\ + + # Mark the EC state as RELEASED + self._state = ECState.RELEASED def shutdown(self): """ Releases all resources and stops the ExperimentController