Spaces:
Sleeping
Sleeping
Update vps_monitor.py
Browse files- vps_monitor.py +4 -4
vps_monitor.py
CHANGED
@@ -89,11 +89,11 @@ def check_and_run_script(config):
|
|
89 |
if output and (last_pid or script_path in output):
|
90 |
parts = output.split()
|
91 |
if last_pid:
|
92 |
-
pid =
|
93 |
-
runtime = parts[1]
|
94 |
else:
|
95 |
-
pid = parts[1]
|
96 |
-
runtime = parts[9] if len(parts) > 9 else "
|
97 |
status = "Running"
|
98 |
logger.info(f"Script {script_name} is running. PID: {pid}, Runtime: {runtime}")
|
99 |
else:
|
|
|
89 |
if output and (last_pid or script_path in output):
|
90 |
parts = output.split()
|
91 |
if last_pid:
|
92 |
+
pid = last_pid
|
93 |
+
runtime = parts[1] if len(parts) > 1 else "Unknown"
|
94 |
else:
|
95 |
+
pid = parts[1] if len(parts) > 1 else "Unknown"
|
96 |
+
runtime = parts[9] if len(parts) > 9 else "Unknown"
|
97 |
status = "Running"
|
98 |
logger.info(f"Script {script_name} is running. PID: {pid}, Runtime: {runtime}")
|
99 |
else:
|