Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
10
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Open sidebar
Simone Rossi
main
Commits
1465e094
Commit
1465e094
authored
Feb 28, 2019
by
Simone Rossi
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[fix] get user quota every 15 seconds
Signed-off-by:
Simone Rossi
<
simone.rossi.93@gmail.com
>
parent
90078a2d
Pipeline
#11836
canceled with stages
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
2 deletions
+5
-2
scripts/grid_queue.py
scripts/grid_queue.py
+5
-2
No files found.
scripts/grid_queue.py
View file @
1465e094
...
...
@@ -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'
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment