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
8700a6da
authored
Aug 19, 2014
by
Guba Sándor
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add async_queue parameters to use slow queue for long tasks
parent
611af2e3
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
0 deletions
+5
-0
circle/vm/operations.py
+5
-0
No files found.
circle/vm/operations.py
View file @
8700a6da
...
@@ -215,6 +215,7 @@ class DownloadDiskOperation(InstanceOperation):
...
@@ -215,6 +215,7 @@ class DownloadDiskOperation(InstanceOperation):
has_percentage
=
True
has_percentage
=
True
required_perms
=
(
'storage.download_disk'
,
)
required_perms
=
(
'storage.download_disk'
,
)
accept_states
=
(
'STOPPED'
,
'PENDING'
,
'RUNNING'
)
accept_states
=
(
'STOPPED'
,
'PENDING'
,
'RUNNING'
)
async_queue
=
"localhost.man.slow"
def
_operation
(
self
,
user
,
url
,
task
,
activity
,
name
=
None
):
def
_operation
(
self
,
user
,
url
,
task
,
activity
,
name
=
None
):
activity
.
result
=
url
activity
.
result
=
url
...
@@ -356,6 +357,7 @@ class MigrateOperation(InstanceOperation):
...
@@ -356,6 +357,7 @@ class MigrateOperation(InstanceOperation):
"seconds of interruption (live migration)."
)
"seconds of interruption (live migration)."
)
required_perms
=
()
required_perms
=
()
accept_states
=
(
'RUNNING'
,
)
accept_states
=
(
'RUNNING'
,
)
async_queue
=
"localhost.man.slow"
def
rollback
(
self
,
activity
):
def
rollback
(
self
,
activity
):
with
activity
.
sub_activity
(
with
activity
.
sub_activity
(
...
@@ -506,6 +508,7 @@ class SaveAsTemplateOperation(InstanceOperation):
...
@@ -506,6 +508,7 @@ class SaveAsTemplateOperation(InstanceOperation):
abortable
=
True
abortable
=
True
required_perms
=
(
'vm.create_template'
,
)
required_perms
=
(
'vm.create_template'
,
)
accept_states
=
(
'RUNNING'
,
'PENDING'
,
'STOPPED'
)
accept_states
=
(
'RUNNING'
,
'PENDING'
,
'STOPPED'
)
async_queue
=
"localhost.man.slow"
def
is_preferred
(
self
):
def
is_preferred
(
self
):
return
(
self
.
instance
.
is_base
and
return
(
self
.
instance
.
is_base
and
...
@@ -664,6 +667,7 @@ class SleepOperation(InstanceOperation):
...
@@ -664,6 +667,7 @@ class SleepOperation(InstanceOperation):
"storage resources, and keep network resources allocated."
)
"storage resources, and keep network resources allocated."
)
required_perms
=
()
required_perms
=
()
accept_states
=
(
'RUNNING'
,
)
accept_states
=
(
'RUNNING'
,
)
async_queue
=
"localhost.man.slow"
def
is_preferred
(
self
):
def
is_preferred
(
self
):
return
(
not
self
.
instance
.
is_base
and
return
(
not
self
.
instance
.
is_base
and
...
@@ -830,6 +834,7 @@ class FlushOperation(NodeOperation):
...
@@ -830,6 +834,7 @@ class FlushOperation(NodeOperation):
name
=
_
(
"flush"
)
name
=
_
(
"flush"
)
description
=
_
(
"Disable node and move all instances to other ones."
)
description
=
_
(
"Disable node and move all instances to other ones."
)
required_perms
=
()
required_perms
=
()
async_queue
=
"localhost.man.slow"
def
on_abort
(
self
,
activity
,
error
):
def
on_abort
(
self
,
activity
,
error
):
from
manager.scheduler
import
TraitsUnsatisfiableException
from
manager.scheduler
import
TraitsUnsatisfiableException
...
...
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