From 9983771429fef9ccfea8aa4e9f95bebbeecd9fa8 Mon Sep 17 00:00:00 2001 From: jack xu Date: Fri, 17 Mar 2023 09:27:05 +0800 Subject: [PATCH] Update async_task.py Fixed sleep being too long and invalid parameter values --- myapp/tasks/async_task.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/myapp/tasks/async_task.py b/myapp/tasks/async_task.py index dd226492..2e4d6d87 100644 --- a/myapp/tasks/async_task.py +++ b/myapp/tasks/async_task.py @@ -26,7 +26,7 @@ def check_docker_commit(task,docker_id): # 在页面中测试时会自定接收 begin_time=datetime.datetime.now() now_time=datetime.datetime.now() while((now_time-begin_time).seconds<1800): # 也就是最多commit push 30分钟 - time.sleep(12000) + time.sleep(60) commit_pods = k8s_client.get_pods(namespace=namespace,pod_name=pod_name) if commit_pods: commit_pod=commit_pods[0]