optimized control_mqtt
This commit is contained in:
19
subscribe_ase_receiver.py
Normal file
19
subscribe_ase_receiver.py
Normal 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")
|
||||
Reference in New Issue
Block a user