Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
gga_load_data
Manage
Activity
Members
Labels
Plan
Issues
12
Issue boards
Milestones
Wiki
Code
Merge requests
5
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
abims
e-infra
gga_load_data
Commits
14eac2c8
Commit
14eac2c8
authored
3 years ago
by
Loraine Gueguen
Browse files
Options
Downloads
Patches
Plain Diff
comment checking job state
parent
e9abe404
No related branches found
Branches containing commit
No related tags found
Tags containing commit
2 merge requests
!10
Release 2.0
,
!9
Release 2.0 (merge dev to master)
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
gga_load_data.py
+19
-19
19 additions, 19 deletions
gga_load_data.py
with
19 additions
and
19 deletions
gga_load_data.py
+
19
−
19
View file @
14eac2c8
...
...
@@ -206,25 +206,25 @@ class LoadData(speciesData.SpeciesData):
time
.
sleep
(
1
)
# Wait for uploads to complete
logging
.
info
(
"
Waiting for import jobs to finish... please wait
"
)
# Checking job state (only necessary if ran using SLURM)
while
True
:
try
:
# "C" state means the job is completed, no need to wait for it
ret
=
subprocess
.
check_output
(
"
squeue | grep -v
\"
C debug
\"
| grep -v
\"
JOBID
\"
|| true
"
,
shell
=
True
)
if
not
len
(
ret
):
break
time
.
sleep
(
3
)
except
subprocess
.
CalledProcessError
as
inst
:
if
inst
.
returncode
==
153
:
# queue is empty
break
else
:
raise
time
.
sleep
(
10
)
#
#
Wait for uploads to complete
#
logging.info("Waiting for import jobs to finish... please wait")
#
#
#
Checking job state (only necessary if ran using SLURM)
#
while True:
#
try:
#
# "C" state means the job is completed, no need to wait for it
#
ret = subprocess.check_output("squeue | grep -v \"C debug\" | grep -v \"JOBID\" || true",
#
shell=True)
#
if not len(ret):
#
break
#
time.sleep(3)
#
except subprocess.CalledProcessError as inst:
#
if inst.returncode == 153: # queue is empty
#
break
#
else:
#
raise
#
#
time.sleep(10)
# Batch renaming --> Throws a critical error at the moment
# logging.info("Import finished, now renaming datasets with pretty names")
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment