diff --git a/README.md b/README.md index 02d0f7d..bbedb12 100644 --- a/README.md +++ b/README.md @@ -79,7 +79,7 @@ Comment: - Mode opératoire : - pour lancer agentA seulement : ./pyros.py start agentA [-c configfile] - pour lancer plusieurs agents : ./pyros.py start agentA,agentB,... [-c configfile] - (ou encore: activer l'environnement virtuel, puis lancer "./AgentA.py configfile") + (ou encore: activer l'environnement virtuel, puis lancer "cd src/agent/ ; ./AgentA.py configfile") - pour utiliser thread ou processus : il suffit de mettre la constante RUN_IN_THREAD de AgentA (ou AgentB ou AgentX) à False ou True - Scenario de test : diff --git a/src/common/models.py b/src/common/models.py index 97dd886..5cf2f34 100644 --- a/src/common/models.py +++ b/src/common/models.py @@ -290,6 +290,7 @@ class Command(models.Model): @classmethod def delete_commands_with_running_status_for_agent(cls, agent_name): + print("Delete (false) 'running' command if exists:") running_commands = cls.objects.filter( # only commands for agent agent_name receiver = agent_name, @@ -299,13 +300,13 @@ class Command(models.Model): #sender_deposit_time__gte = cls.get_peremption_date_from_now(), ) if running_commands: - print("Delete (false) 'running' command:") Command.show_commands(running_commands) running_commands.delete() else: print("") @classmethod def delete_pending_commands_for_agent(cls, agent_name): + print("Delete pending command(s) if exists:") pending_commands = cls.objects.filter( # only commands for agent agent_name receiver = agent_name, @@ -315,7 +316,6 @@ class Command(models.Model): #sender_deposit_time__gte = cls.get_peremption_date_from_now(), ) if pending_commands: - print("Delete these pending command(s):") Command.show_commands(pending_commands) pending_commands.delete() else: print("") -- libgit2 0.21.2