You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
distros-overlay/sys-apps/calculate-core/files/calculate-core-3.2.0_alpha7...

32 lines
1.2 KiB

This file contains ambiguous Unicode characters!

This file contains ambiguous Unicode characters that may be confused with others in your current locale. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to highlight these characters.

diff --git core/server/gen_pid.py core/server/gen_pid.py
index 1bd1a40..947e88d 100644
--- core/server/gen_pid.py
+++ core/server/gen_pid.py
@@ -30,6 +30,12 @@ class ProcessStatus:
def search_worked_process(method_name, clVars):
+ """
+ Найти все работающие процессы
+
+ Возвращает список процессов со статусом Worked и существующем системным
+ процессом
+ """
def generator():
pids = clVars.Get('core.cl_core_pids_path')
for pidfile in listDirectory(pids, fullPath=True):
@@ -37,12 +43,10 @@ def search_worked_process(method_name, clVars):
status = pickle.load(open(pidfile))
if (status['name'] == method_name and
status['status'] == ProcessStatus.Worked):
- pid = int(path.basename(pidfile)[:-4])
if path.exists(path.join("/proc",str(status['os_pid']))):
yield status['os_pid']
- except (ValueError, EOFError, OSError):
+ except (ValueError, KeyError, EOFError, OSError):
pass
- #print "DEBUG",list(generator())
return list(generator())