Skip to content

Commit

Permalink
fix: fix wrong atomic op for activation instance
Browse files Browse the repository at this point in the history
  • Loading branch information
Alex-Izquierdo committed Jun 4, 2024
1 parent a0822b8 commit ef90ec5
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions src/aap_eda/services/activation/activation_manager.py
Original file line number Diff line number Diff line change
Expand Up @@ -195,6 +195,8 @@ def _start_activation_instance(self):
"Creating a new activation instance for "
f"activation: {self.db_instance.id}",
)
if not self.check_new_process_allowed():
raise exceptions.MaxRunningProcessesError
self._create_activation_instance()

self.db_instance.refresh_from_db()
Expand Down Expand Up @@ -982,9 +984,6 @@ def _create_activation_instance(self):
if hasattr(self.db_instance, "git_hash")
else ""
)

if not self.check_new_process_allowed():
raise exceptions.MaxRunningProcessesError
args = {
"name": self.db_instance.name,
"status": ActivationStatus.STARTING,
Expand Down

0 comments on commit ef90ec5

Please sign in to comment.