Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
Gelencsér Szabolcs
/
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
39f2c65c
authored
Mar 18, 2014
by
Őry Máté
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
vm: fix local_tasks.flush
* accept uuid * call the correct method
parent
039bcad8
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
3 deletions
+4
-3
circle/vm/models/node.py
+3
-2
circle/vm/tasks/local_tasks.py
+1
-1
No files found.
circle/vm/models/node.py
View file @
39f2c65c
...
...
@@ -101,10 +101,11 @@ class Node(TimeStampedModel):
self
.
enabled
=
False
self
.
save
()
def
flush
(
self
,
user
=
None
):
def
flush
(
self
,
user
=
None
,
task_uuid
=
None
):
"""Disable node and move all instances to other ones.
"""
with
node_activity
(
'flush'
,
node
=
self
,
user
=
user
)
as
act
:
with
node_activity
(
'flush'
,
node
=
self
,
user
=
user
,
task_uuid
=
task_uuid
)
as
act
:
self
.
disable
(
user
,
act
)
for
i
in
self
.
instance_set
.
all
():
with
act
.
sub_activity
(
'migrate_instance_
%
d'
%
i
.
pk
):
...
...
circle/vm/tasks/local_tasks.py
View file @
39f2c65c
...
...
@@ -61,4 +61,4 @@ def migrate(instance, to_node, user):
@celery.task
def
flush
(
node
,
user
):
node
.
migrate
(
task_uuid
=
flush
.
request
.
id
,
user
=
user
)
node
.
flush
(
task_uuid
=
flush
.
request
.
id
,
user
=
user
)
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