Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
Gyuricska Milán
/
cloud
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
443b387e
authored
Sep 11, 2014
by
Őry Máté
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
vm: finish os_boot subactivities if agent starts
parent
adb2d8e2
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
6 deletions
+11
-6
circle/vm/tasks/local_agent_tasks.py
+11
-6
No files found.
circle/vm/tasks/local_agent_tasks.py
View file @
443b387e
...
@@ -85,16 +85,22 @@ def agent_started(vm, version=None):
...
@@ -85,16 +85,22 @@ def agent_started(vm, version=None):
from
vm.models
import
Instance
,
instance_activity
,
InstanceActivity
from
vm.models
import
Instance
,
instance_activity
,
InstanceActivity
instance
=
Instance
.
objects
.
get
(
id
=
int
(
vm
.
split
(
'-'
)[
-
1
]))
instance
=
Instance
.
objects
.
get
(
id
=
int
(
vm
.
split
(
'-'
)[
-
1
]))
queue
=
instance
.
get_remote_queue_name
(
"agent"
)
queue
=
instance
.
get_remote_queue_name
(
"agent"
)
initialized
=
InstanceActivity
.
objects
.
filter
(
initialized
=
instance
.
activity_log
.
filter
(
instance
=
instance
,
activity_code
=
'vm.Instance.agent.cleanup'
)
.
exists
()
activity_code
=
'vm.Instance.agent.cleanup'
)
.
exists
()
with
instance_activity
(
code_suffix
=
'agent'
,
with
instance_activity
(
code_suffix
=
'agent'
,
readable_name
=
ugettext_noop
(
'agent'
),
readable_name
=
ugettext_noop
(
'agent'
),
concurrency_check
=
False
,
instance
=
instance
)
as
act
:
instance
=
instance
)
as
act
:
with
act
.
sub_activity
(
'starting'
,
with
act
.
sub_activity
(
'starting'
,
readable_name
=
ugettext_noop
(
'starting'
)):
readable_name
=
ugettext_noop
(
'starting'
)):
pass
pass
for
i
in
InstanceActivity
.
objects
.
filter
(
instance
=
instance
,
activity_code__endswith
=
'.os_boot'
,
finished__isnull
=
True
):
i
.
finish
(
True
)
if
version
and
version
!=
settings
.
AGENT_VERSION
:
if
version
and
version
!=
settings
.
AGENT_VERSION
:
try
:
try
:
update_agent
(
instance
,
act
)
update_agent
(
instance
,
act
)
...
@@ -108,10 +114,9 @@ def agent_started(vm, version=None):
...
@@ -108,10 +114,9 @@ def agent_started(vm, version=None):
send_init_commands
(
instance
,
act
)
send_init_commands
(
instance
,
act
)
send_networking_commands
(
instance
,
act
)
send_networking_commands
(
instance
,
act
)
with
act
.
sub_activity
(
with
act
.
sub_activity
(
'start_access_server'
,
'start_access_server'
,
readable_name
=
ugettext_noop
(
readable_name
=
ugettext_noop
(
'start access server'
)
'start access server'
)):
):
start_access_server
.
apply_async
(
queue
=
queue
,
args
=
(
vm
,
))
start_access_server
.
apply_async
(
queue
=
queue
,
args
=
(
vm
,
))
...
...
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