Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
Gelencsér Szabolcs
/
cloud
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Members
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
52456552
authored
Jun 10, 2014
by
Guba Sándor
Committed by
Őry Máté
Jun 13, 2014
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
activity: fixed get_percentage parameter based on job info
parent
50555ea6
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
2 deletions
+5
-2
circle/vm/models/activity.py
+5
-2
No files found.
circle/vm/models/activity.py
View file @
52456552
...
...
@@ -124,8 +124,11 @@ class InstanceActivity(ActivityModel):
def
get_percentage
(
self
):
"""Returns the percentage of the running operation if available.
"""
if
self
.
has_percentage
():
celery
.
AsyncResult
(
id
=
self
.
task_uuid
)
.
info
.
get
(
"percent"
)
result
=
celery
.
AsyncResult
(
id
=
self
.
task_uuid
)
if
self
.
has_percentage
()
and
result
.
info
is
not
None
:
return
result
.
info
.
get
(
"percent"
)
else
:
return
0
@property
def
is_abortable
(
self
):
...
...
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