optimized control_mqtt

This commit is contained in:
2024-12-21 18:25:54 +01:00
parent 1a1b6f36d3
commit 282cb119ea
7 changed files with 177 additions and 112 deletions

19
subscribe_ase_receiver.py Normal file
View File

@@ -0,0 +1,19 @@
import sys
import time
import os
# Verifica degli argomenti passati
if len(sys.argv) != 2:
print("Uso: python programma.py <username>")
sys.exit(1)
# Recupera il nome del client dall'argomento
username = sys.argv[1]
# Simula un processo in esecuzione
print(f"Inizio elaborazione per {username} (PID: {os.getpid()})")
try:
while True:
time.sleep(5) # Simula un lavoro in corso
except KeyboardInterrupt:
print(f"Processo per {username} terminato")