deployment observability, filters, stats, details
This commit is contained in:
@@ -1,5 +1,21 @@
|
||||
import os
|
||||
import subprocess
|
||||
|
||||
|
||||
def run_command(args):
|
||||
return subprocess.run(args, capture_output=True, text=True)
|
||||
|
||||
|
||||
def run_command_background(args, extra_env=None):
|
||||
env = os.environ.copy()
|
||||
if extra_env:
|
||||
env.update({key: "" if value is None else str(value) for key, value in extra_env.items()})
|
||||
|
||||
return subprocess.Popen(
|
||||
args,
|
||||
env=env,
|
||||
stdout=subprocess.DEVNULL,
|
||||
stderr=subprocess.DEVNULL,
|
||||
stdin=subprocess.DEVNULL,
|
||||
start_new_session=True,
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user