Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
S
snf-ganeti
Manage
Activity
Members
Labels
Plan
Issues
0
Issue boards
Milestones
Wiki
Code
Merge requests
0
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
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
itminedu
snf-ganeti
Commits
b7cb9024
Commit
b7cb9024
authored
16 years ago
by
Michael Hanselmann
Browse files
Options
Downloads
Patches
Plain Diff
jqueue: Always print message for 100% when inspecting queue
Reviewed-by: iustinp
parent
b28a3e8b
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
lib/jqueue.py
+4
-3
4 additions, 3 deletions
lib/jqueue.py
with
4 additions
and
3 deletions
lib/jqueue.py
+
4
−
3
View file @
b7cb9024
...
@@ -542,13 +542,14 @@ class JobQueue(object):
...
@@ -542,13 +542,14 @@ class JobQueue(object):
logging
.
info
(
"
Inspecting job queue
"
)
logging
.
info
(
"
Inspecting job queue
"
)
all_job_ids
=
self
.
_GetJobIDsUnlocked
()
all_job_ids
=
self
.
_GetJobIDsUnlocked
()
jobs_count
=
len
(
all_job_ids
)
lastinfo
=
time
.
time
()
lastinfo
=
time
.
time
()
for
idx
,
job_id
in
enumerate
(
all_job_ids
):
for
idx
,
job_id
in
enumerate
(
all_job_ids
):
# Give an update every 1000 jobs or 10 seconds
# Give an update every 1000 jobs or 10 seconds
if
idx
%
1000
==
0
or
time
.
time
()
>=
(
lastinfo
+
10.0
)
:
if
(
idx
%
1000
==
0
or
time
.
time
()
>=
(
lastinfo
+
10.0
)
or
jobs_count
=
len
(
all_job_ids
)
idx
==
(
jobs_count
-
1
)):
logging
.
info
(
"
Job queue inspection: %d/%d (%0.1f %%)
"
,
logging
.
info
(
"
Job queue inspection: %d/%d (%0.1f %%)
"
,
idx
,
jobs_count
,
100.0
*
(
idx
+
1
)
/
jobs_count
)
idx
,
jobs_count
-
1
,
100.0
*
(
idx
+
1
)
/
jobs_count
)
lastinfo
=
time
.
time
()
lastinfo
=
time
.
time
()
job
=
self
.
_LoadJobUnlocked
(
job_id
)
job
=
self
.
_LoadJobUnlocked
(
job_id
)
...
...
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