Commit 5a76fb800c82ca20ea6623b1fcf3d290b87cfc7b
1 parent
31e31f3b
Exists in
dev
petit update
Showing
2 changed files
with
3 additions
and
3 deletions
Show diff stats
README.md
... | ... | @@ -79,7 +79,7 @@ Comment: |
79 | 79 | - Mode opératoire : |
80 | 80 | - pour lancer agentA seulement : ./pyros.py start agentA [-c configfile] |
81 | 81 | - pour lancer plusieurs agents : ./pyros.py start agentA,agentB,... [-c configfile] |
82 | - (ou encore: activer l'environnement virtuel, puis lancer "./AgentA.py configfile") | |
82 | + (ou encore: activer l'environnement virtuel, puis lancer "cd src/agent/ ; ./AgentA.py configfile") | |
83 | 83 | - pour utiliser thread ou processus : il suffit de mettre la constante RUN_IN_THREAD de AgentA (ou AgentB ou AgentX) à False ou True |
84 | 84 | |
85 | 85 | - Scenario de test : | ... | ... |
src/common/models.py
... | ... | @@ -290,6 +290,7 @@ class Command(models.Model): |
290 | 290 | |
291 | 291 | @classmethod |
292 | 292 | def delete_commands_with_running_status_for_agent(cls, agent_name): |
293 | + print("Delete (false) 'running' command if exists:") | |
293 | 294 | running_commands = cls.objects.filter( |
294 | 295 | # only commands for agent agent_name |
295 | 296 | receiver = agent_name, |
... | ... | @@ -299,13 +300,13 @@ class Command(models.Model): |
299 | 300 | #sender_deposit_time__gte = cls.get_peremption_date_from_now(), |
300 | 301 | ) |
301 | 302 | if running_commands: |
302 | - print("Delete (false) 'running' command:") | |
303 | 303 | Command.show_commands(running_commands) |
304 | 304 | running_commands.delete() |
305 | 305 | else: print("<None>") |
306 | 306 | |
307 | 307 | @classmethod |
308 | 308 | def delete_pending_commands_for_agent(cls, agent_name): |
309 | + print("Delete pending command(s) if exists:") | |
309 | 310 | pending_commands = cls.objects.filter( |
310 | 311 | # only commands for agent agent_name |
311 | 312 | receiver = agent_name, |
... | ... | @@ -315,7 +316,6 @@ class Command(models.Model): |
315 | 316 | #sender_deposit_time__gte = cls.get_peremption_date_from_now(), |
316 | 317 | ) |
317 | 318 | if pending_commands: |
318 | - print("Delete these pending command(s):") | |
319 | 319 | Command.show_commands(pending_commands) |
320 | 320 | pending_commands.delete() |
321 | 321 | else: print("<None>") | ... | ... |