Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
CIRCLE
/
cloud
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
94
Merge Requests
10
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
Hide 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):
from
vm.models
import
Instance
,
instance_activity
,
InstanceActivity
instance
=
Instance
.
objects
.
get
(
id
=
int
(
vm
.
split
(
'-'
)[
-
1
]))
queue
=
instance
.
get_remote_queue_name
(
"agent"
)
initialized
=
InstanceActivity
.
objects
.
filter
(
instance
=
instance
,
activity_code
=
'vm.Instance.agent.cleanup'
)
.
exists
()
initialized
=
instance
.
activity_log
.
filter
(
activity_code
=
'vm.Instance.agent.cleanup'
)
.
exists
()
with
instance_activity
(
code_suffix
=
'agent'
,
readable_name
=
ugettext_noop
(
'agent'
),
concurrency_check
=
False
,
instance
=
instance
)
as
act
:
with
act
.
sub_activity
(
'starting'
,
readable_name
=
ugettext_noop
(
'starting'
)):
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
:
try
:
update_agent
(
instance
,
act
)
...
...
@@ -108,10 +114,9 @@ def agent_started(vm, version=None):
send_init_commands
(
instance
,
act
)
send_networking_commands
(
instance
,
act
)
with
act
.
sub_activity
(
'start_access_server'
,
readable_name
=
ugettext_noop
(
'start access server'
)
):
with
act
.
sub_activity
(
'start_access_server'
,
readable_name
=
ugettext_noop
(
'start access server'
)):
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