Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
Gutyán Gábor
/
circlestack
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Snippets
Members
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
0407bfa4
authored
Sep 15, 2014
by
Őry Máté
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
vm: add a non-finished subactivity after updating agent
closes #290
parent
ea3039d6
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
2 deletions
+6
-2
circle/vm/tasks/local_agent_tasks.py
+6
-2
No files found.
circle/vm/tasks/local_agent_tasks.py
View file @
0407bfa4
...
@@ -27,6 +27,7 @@ from base64 import encodestring
...
@@ -27,6 +27,7 @@ from base64 import encodestring
from
StringIO
import
StringIO
from
StringIO
import
StringIO
from
tarfile
import
TarFile
,
TarInfo
from
tarfile
import
TarFile
,
TarInfo
from
django.conf
import
settings
from
django.conf
import
settings
from
django.db.models
import
Q
from
django.utils
import
timezone
from
django.utils
import
timezone
from
django.utils.translation
import
ugettext_noop
from
django.utils.translation
import
ugettext_noop
from
celery.result
import
TimeoutError
from
celery.result
import
TimeoutError
...
@@ -97,8 +98,9 @@ def agent_started(vm, version=None):
...
@@ -97,8 +98,9 @@ def agent_started(vm, version=None):
pass
pass
for
i
in
InstanceActivity
.
objects
.
filter
(
for
i
in
InstanceActivity
.
objects
.
filter
(
instance
=
instance
,
activity_code__endswith
=
'.os_boot'
,
(
Q
(
activity_code__endswith
=
'.os_boot'
)
|
finished__isnull
=
True
):
Q
(
activity_code__endswith
=
'.agent_wait'
)),
instance
=
instance
,
finished__isnull
=
True
):
i
.
finish
(
True
)
i
.
finish
(
True
)
if
version
and
version
!=
settings
.
AGENT_VERSION
:
if
version
and
version
!=
settings
.
AGENT_VERSION
:
...
@@ -107,6 +109,8 @@ def agent_started(vm, version=None):
...
@@ -107,6 +109,8 @@ def agent_started(vm, version=None):
except
TimeoutError
:
except
TimeoutError
:
pass
pass
else
:
else
:
act
.
sub_activity
(
'agent_wait'
,
readable_name
=
ugettext_noop
(
"wait agent restarting"
),
interruptible
=
True
)
return
# agent is going to restart
return
# agent is going to restart
if
not
initialized
:
if
not
initialized
:
...
...
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