mirror of https://github.com/databricks/cli.git
lint
This commit is contained in:
parent
c898aafbed
commit
eb2b18721d
|
@ -5,6 +5,7 @@ import time
|
|||
import platform
|
||||
import subprocess
|
||||
|
||||
|
||||
def wait_pid(pid):
|
||||
max_attempts = 600 # 600 * 0.1 seconds = 1 minute
|
||||
sleep_time = 0.1
|
||||
|
@ -15,7 +16,7 @@ def wait_pid(pid):
|
|||
# Windows approach: use tasklist to check for the existence of the process.
|
||||
try:
|
||||
# Get the output of 'tasklist'
|
||||
output = subprocess.check_output(['tasklist'], text=True)
|
||||
output = subprocess.check_output(["tasklist"], text=True)
|
||||
except subprocess.CalledProcessError:
|
||||
print("[wait_pid] Error retrieving tasklist. Assuming process has ended.")
|
||||
return 0
|
||||
|
@ -37,6 +38,7 @@ def wait_pid(pid):
|
|||
print(f"Timeout: Process {pid} did not end within 1 minute")
|
||||
return 1
|
||||
|
||||
|
||||
try:
|
||||
pid = int(sys.argv[1])
|
||||
except ValueError:
|
||||
|
|
Loading…
Reference in New Issue