MCPcopy Create free account
hub / github.com/adobe/Marinus / is_running

Function is_running

python3_cron_scripts/get_sonar_data_unified.py:42–52  ·  view source on GitHub ↗

Is the provided process name is currently running?

(process)

Source from the content-addressed store, hash-verified

40
41
42def is_running(process):
43 """
44 Is the provided process name is currently running?
45 """
46 proc_list = subprocess.Popen(["pgrep", "-f", process], stdout=subprocess.PIPE)
47 for proc in proc_list.stdout:
48 if proc.decode("utf-8").rstrip() != str(os.getpid()) and proc.decode(
49 "utf-8"
50 ).rstrip() != str(os.getppid()):
51 return True
52 return False
53
54
55def download_file(s, url, data_dir):

Callers 1

mainFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected