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
Commit
2852c45f
authored
Feb 13, 2014
by
Guba Sándor
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
instance: get_remote_queue now throws exception on missing self.Node
parent
7843b85d
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
2 deletions
+6
-2
circle/vm/models/instance.py
+6
-2
No files found.
circle/vm/models/instance.py
View file @
2852c45f
...
@@ -535,7 +535,10 @@ class Instance(AclBase, VirtualMachineDescModel, TimeStampedModel):
...
@@ -535,7 +535,10 @@ class Instance(AclBase, VirtualMachineDescModel, TimeStampedModel):
"""Get the remote worker queue name of this instance with the specified
"""Get the remote worker queue name of this instance with the specified
queue ID.
queue ID.
"""
"""
return
self
.
node
.
get_remote_queue_name
(
queue_id
)
if
self
.
node
else
None
if
self
.
node
:
return
self
.
node
.
get_remote_queue_name
(
queue_id
)
else
:
raise
Node
.
DoesNotExist
()
def
renew
(
self
,
which
=
'both'
):
def
renew
(
self
,
which
=
'both'
):
"""Renew virtual machine instance leases.
"""Renew virtual machine instance leases.
...
@@ -843,8 +846,9 @@ class Instance(AclBase, VirtualMachineDescModel, TimeStampedModel):
...
@@ -843,8 +846,9 @@ class Instance(AclBase, VirtualMachineDescModel, TimeStampedModel):
with
instance_activity
(
code_suffix
=
'shutdown'
,
instance
=
self
,
with
instance_activity
(
code_suffix
=
'shutdown'
,
instance
=
self
,
on_abort
=
__on_abort
,
on_commit
=
__on_commit
,
on_abort
=
__on_abort
,
on_commit
=
__on_commit
,
task_uuid
=
task_uuid
,
user
=
user
):
task_uuid
=
task_uuid
,
user
=
user
):
queue_name
=
self
.
get_remote_queue_name
(
'vm'
)
queue_name
=
self
.
get_remote_queue_name
(
'vm'
)
logger
.
debug
(
"RPC Shutdown at queue:
%
s, for vm:
%
s."
,
self
.
vm_name
,
queue_name
)
vm_tasks
.
shutdown
.
apply_async
(
args
=
[
self
.
vm_name
],
vm_tasks
.
shutdown
.
apply_async
(
args
=
[
self
.
vm_name
],
queue
=
queue_name
)
.
get
()
queue
=
queue_name
)
.
get
()
self
.
node
=
None
self
.
node
=
None
...
...
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