diff --git a/src/aleph/vm/models.py b/src/aleph/vm/models.py index 6d6b77d97..6f87b2363 100644 --- a/src/aleph/vm/models.py +++ b/src/aleph/vm/models.py @@ -96,10 +96,6 @@ def is_running(self) -> bool: else bool(self.times.starting_at and not self.times.stopping_at) ) - @property - def is_allocated(self) -> bool: - return bool(self.times.starting_at and not self.times.stopping_at) - @property def is_stopping(self) -> bool: return bool(self.times.stopping_at and not self.times.stopped_at) diff --git a/src/aleph/vm/pool.py b/src/aleph/vm/pool.py index 839b1a3cc..8c5f9fd8b 100644 --- a/src/aleph/vm/pool.py +++ b/src/aleph/vm/pool.py @@ -161,9 +161,7 @@ def get_unique_vm_id(self) -> int: # # We therefore recycle vm_id values from executions that are not running # anymore. - currently_used_vm_ids = { - execution.vm_id for execution in self.executions.values() if execution.is_allocated - } + currently_used_vm_ids = {execution.vm_id for execution in self.executions.values()} for i in range(settings.START_ID_INDEX, 255**2): if self.network: