Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
Fukász Rómeó Ervin
/
cloud
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Members
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
A prog2-höz tartozó friss repo anyagok itt elérhetőek:
https://git.iit.bme.hu/
Commit
685d5c82
authored
Oct 11, 2013
by
Dudás Ádám
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
vm: return AsyncResult of async methods
parent
3180f36a
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
8 deletions
+8
-8
circle/vm/models.py
+8
-8
No files found.
circle/vm/models.py
View file @
685d5c82
...
@@ -571,7 +571,7 @@ class Instance(BaseResourceConfigModel, TimeStampedModel):
...
@@ -571,7 +571,7 @@ class Instance(BaseResourceConfigModel, TimeStampedModel):
def
deploy_async
(
self
,
user
=
None
):
def
deploy_async
(
self
,
user
=
None
):
"""Execute deploy asynchronously.
"""Execute deploy asynchronously.
"""
"""
local_tasks
.
deploy
.
apply_async
(
args
=
[
self
,
user
],
return
local_tasks
.
deploy
.
apply_async
(
args
=
[
self
,
user
],
queue
=
"localhost.man"
)
queue
=
"localhost.man"
)
def
destroy
(
self
,
user
=
None
,
task_uuid
=
None
):
def
destroy
(
self
,
user
=
None
,
task_uuid
=
None
):
...
@@ -617,7 +617,7 @@ class Instance(BaseResourceConfigModel, TimeStampedModel):
...
@@ -617,7 +617,7 @@ class Instance(BaseResourceConfigModel, TimeStampedModel):
def
destroy_async
(
self
,
user
=
None
):
def
destroy_async
(
self
,
user
=
None
):
"""Execute destroy asynchronously.
"""Execute destroy asynchronously.
"""
"""
local_tasks
.
destroy
.
apply_async
(
args
=
[
self
,
user
],
return
local_tasks
.
destroy
.
apply_async
(
args
=
[
self
,
user
],
queue
=
"localhost.man"
)
queue
=
"localhost.man"
)
def
sleep
(
self
,
user
=
None
,
task_uuid
=
None
):
def
sleep
(
self
,
user
=
None
,
task_uuid
=
None
):
...
@@ -639,7 +639,8 @@ class Instance(BaseResourceConfigModel, TimeStampedModel):
...
@@ -639,7 +639,8 @@ class Instance(BaseResourceConfigModel, TimeStampedModel):
def
sleep_async
(
self
,
user
=
None
):
def
sleep_async
(
self
,
user
=
None
):
"""Execute sleep asynchronously.
"""Execute sleep asynchronously.
"""
"""
local_tasks
.
sleep
.
apply_async
(
args
=
[
self
,
user
],
queue
=
"localhost.man"
)
return
local_tasks
.
sleep
.
apply_async
(
args
=
[
self
,
user
],
queue
=
"localhost.man"
)
def
wake_up
(
self
,
user
=
None
,
task_uuid
=
None
):
def
wake_up
(
self
,
user
=
None
,
task_uuid
=
None
):
act
=
InstanceActivity
(
activity_code
=
'vm.Instance.wake_up'
)
act
=
InstanceActivity
(
activity_code
=
'vm.Instance.wake_up'
)
...
@@ -658,7 +659,7 @@ class Instance(BaseResourceConfigModel, TimeStampedModel):
...
@@ -658,7 +659,7 @@ class Instance(BaseResourceConfigModel, TimeStampedModel):
def
wake_up_async
(
self
,
user
=
None
):
def
wake_up_async
(
self
,
user
=
None
):
"""Execute wake_up asynchronously.
"""Execute wake_up asynchronously.
"""
"""
local_tasks
.
wake_up
.
apply_async
(
args
=
[
self
,
user
],
return
local_tasks
.
wake_up
.
apply_async
(
args
=
[
self
,
user
],
queue
=
"localhost.man"
)
queue
=
"localhost.man"
)
def
shutdown
(
self
,
user
=
None
,
task_uuid
=
None
):
def
shutdown
(
self
,
user
=
None
,
task_uuid
=
None
):
...
@@ -680,7 +681,7 @@ class Instance(BaseResourceConfigModel, TimeStampedModel):
...
@@ -680,7 +681,7 @@ class Instance(BaseResourceConfigModel, TimeStampedModel):
def
shutdown_async
(
self
,
user
=
None
):
def
shutdown_async
(
self
,
user
=
None
):
"""Execute shutdown asynchronously.
"""Execute shutdown asynchronously.
"""
"""
local_tasks
.
shutdown
.
apply_async
(
args
=
[
self
,
user
],
return
local_tasks
.
shutdown
.
apply_async
(
args
=
[
self
,
user
],
queue
=
"localhost.man"
)
queue
=
"localhost.man"
)
def
reset
(
self
,
user
=
None
,
task_uuid
=
None
):
def
reset
(
self
,
user
=
None
,
task_uuid
=
None
):
...
@@ -702,7 +703,7 @@ class Instance(BaseResourceConfigModel, TimeStampedModel):
...
@@ -702,7 +703,7 @@ class Instance(BaseResourceConfigModel, TimeStampedModel):
def
reset_async
(
self
,
user
=
None
):
def
reset_async
(
self
,
user
=
None
):
"""Execute reset asynchronously.
"""Execute reset asynchronously.
"""
"""
local_tasks
.
restart
.
apply_async
(
args
=
[
self
,
user
],
return
local_tasks
.
restart
.
apply_async
(
args
=
[
self
,
user
],
queue
=
"localhost.man"
)
queue
=
"localhost.man"
)
def
reboot
(
self
,
user
=
None
,
task_uuid
=
None
):
def
reboot
(
self
,
user
=
None
,
task_uuid
=
None
):
...
@@ -724,10 +725,9 @@ class Instance(BaseResourceConfigModel, TimeStampedModel):
...
@@ -724,10 +725,9 @@ class Instance(BaseResourceConfigModel, TimeStampedModel):
def
reboot_async
(
self
,
user
=
None
):
def
reboot_async
(
self
,
user
=
None
):
"""Execute reboot asynchronously.
"""Execute reboot asynchronously.
"""
"""
local_tasks
.
reboot
.
apply_async
(
args
=
[
self
,
user
],
return
local_tasks
.
reboot
.
apply_async
(
args
=
[
self
,
user
],
queue
=
"localhost.man"
)
queue
=
"localhost.man"
)
class
InstanceActivity
(
TimeStampedModel
):
class
InstanceActivity
(
TimeStampedModel
):
activity_code
=
CharField
(
verbose_name
=
_
(
'activity_code'
),
max_length
=
100
)
activity_code
=
CharField
(
verbose_name
=
_
(
'activity_code'
),
max_length
=
100
)
task_uuid
=
CharField
(
verbose_name
=
_
(
'task_uuid'
),
blank
=
True
,
task_uuid
=
CharField
(
verbose_name
=
_
(
'task_uuid'
),
blank
=
True
,
...
...
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