mirror of
https://github.com/ansible/awx.git
synced 2026-03-18 01:17:35 -02:30
update periodic isolated cleanup to match the new paths post-runner
This commit is contained in:
@@ -39,7 +39,7 @@ def main():
|
||||
job_cutoff = datetime.datetime.now() - datetime.timedelta(hours=1)
|
||||
|
||||
for search_pattern in [
|
||||
'/tmp/ansible_awx_[0-9]*_*', '/tmp/ansible_awx_proot_*',
|
||||
'/tmp/awx_[0-9]*_*', '/tmp/ansible_runner_pi_*',
|
||||
]:
|
||||
for path in glob.iglob(search_pattern):
|
||||
st = os.stat(path)
|
||||
@@ -49,7 +49,7 @@ def main():
|
||||
continue
|
||||
elif modtime > folder_cutoff:
|
||||
try:
|
||||
re_match = re.match(r'\/tmp\/ansible_awx_\d+_.+', path)
|
||||
re_match = re.match(r'\/tmp\/awx_\d+_.+', path)
|
||||
if re_match is not None:
|
||||
if subprocess.check_call(['ansible-runner', 'is-alive', path]) == 0:
|
||||
continue
|
||||
|
||||
Reference in New Issue
Block a user