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
c8549bfd
Commit
c8549bfd
authored
16 years ago
by
Michael Hanselmann
Browse files
Options
Downloads
Patches
Plain Diff
jqueue: Log more information when running opcodes
Reviewed-by: iustinp
parent
ff5fac04
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
lib/jqueue.py
+6
-1
6 additions, 1 deletion
lib/jqueue.py
with
6 additions
and
1 deletion
lib/jqueue.py
+
6
−
1
View file @
c8549bfd
...
@@ -103,10 +103,12 @@ class _QueuedJob(object):
...
@@ -103,10 +103,12 @@ class _QueuedJob(object):
"""
"""
try
:
try
:
for
op
in
self
.
_ops
:
count
=
len
(
self
.
_ops
)
for
idx
,
op
in
enumerate
(
self
.
_ops
):
try
:
try
:
self
.
_lock
.
acquire
()
self
.
_lock
.
acquire
()
try
:
try
:
logging
.
debug
(
"
Op %s/%s: Starting %s
"
,
idx
+
1
,
count
,
op
)
op
.
status
=
constants
.
OP_STATUS_RUNNING
op
.
status
=
constants
.
OP_STATUS_RUNNING
finally
:
finally
:
self
.
_lock
.
release
()
self
.
_lock
.
release
()
...
@@ -115,6 +117,8 @@ class _QueuedJob(object):
...
@@ -115,6 +117,8 @@ class _QueuedJob(object):
self
.
_lock
.
acquire
()
self
.
_lock
.
acquire
()
try
:
try
:
logging
.
debug
(
"
Op %s/%s: Successfully finished %s
"
,
idx
+
1
,
count
,
op
)
op
.
status
=
constants
.
OP_STATUS_SUCCESS
op
.
status
=
constants
.
OP_STATUS_SUCCESS
op
.
result
=
result
op
.
result
=
result
finally
:
finally
:
...
@@ -122,6 +126,7 @@ class _QueuedJob(object):
...
@@ -122,6 +126,7 @@ class _QueuedJob(object):
except
Exception
,
err
:
except
Exception
,
err
:
self
.
_lock
.
acquire
()
self
.
_lock
.
acquire
()
try
:
try
:
logging
.
debug
(
"
Op %s/%s: Error in %s
"
,
idx
+
1
,
count
,
op
)
op
.
status
=
constants
.
OP_STATUS_ERROR
op
.
status
=
constants
.
OP_STATUS_ERROR
op
.
result
=
str
(
err
)
op
.
result
=
str
(
err
)
finally
:
finally
:
...
...
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