Commit 1465e094 authored by Simone Rossi's avatar Simone Rossi

[fix] get user quota every 15 seconds

Signed-off-by: default avatarSimone Rossi <simone.rossi.93@gmail.com>
parent 90078a2d
Pipeline #11836 canceled with stages
......@@ -281,6 +281,7 @@ def main():
job_count = 0
job_ids = []
try:
while len(list_of_jobs) != 0:
......@@ -316,13 +317,15 @@ def main():
continue
logger.info('Job submitted with ID %d' % exec_id)
job_ids.append(exec_id)
import random
time.sleep(random.uniform(0.5, 2))
#import random
#time.sleep(random.uniform(0.5, 2))
time.sleep(15)
else:
logger.warning('Quota exceeded. No jobs can be scheduled now! Sleeping')
time.sleep(15)
quota_jobs, quota_cores, quota_memory = get_user_quota(api, user_id)
logger.info('All jobs have been submitted successfully! Exiting')
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment