Skip to content

Commit

Permalink
job quantity constraint add sleep 1s
Browse files Browse the repository at this point in the history
Signed-off-by: wzh <[email protected]>
  • Loading branch information
zhihuiwan committed May 20, 2020
1 parent 81aecc6 commit f540baf
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions fate_flow/utils/job_controller_utils.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import time
from threading import Lock

from arch.standalone import WorkMode
Expand All @@ -10,6 +11,7 @@
def job_quantity_constraint(job_id, role, party_id, job_info):
lock = Lock()
with lock:
time.sleep(1)
if RuntimeConfig.WORK_MODE == WorkMode.CLUSTER:
if role == LIMIT_ROLE:
running_jobs = job_utils.query_job(status='running', role=role)
Expand Down

0 comments on commit f540baf

Please sign in to comment.