Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
Gelencsér Szabolcs
/
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
9d513b83
authored
Jul 01, 2014
by
Kálmán Viktor
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
vm: fix screenshot
parent
d0ad840c
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
3 additions
and
4 deletions
+3
-4
circle/dashboard/views.py
+1
-2
circle/vm/models/instance.py
+1
-1
circle/vm/operations.py
+1
-1
No files found.
circle/dashboard/views.py
View file @
9d513b83
...
...
@@ -2822,8 +2822,7 @@ class InterfaceDeleteView(DeleteView):
def
get_vm_screenshot
(
request
,
pk
):
instance
=
get_object_or_404
(
Instance
,
pk
=
pk
)
try
:
image
=
instance
.
screenshot
(
instance
=
instance
,
user
=
request
.
user
)
.
getvalue
()
image
=
instance
.
screenshot
(
user
=
request
.
user
)
.
getvalue
()
except
:
# TODO handle this better
raise
Http404
()
...
...
circle/vm/models/instance.py
View file @
9d513b83
...
...
@@ -949,7 +949,7 @@ class Instance(AclBase, VirtualMachineDescModel, StatusModel, OperatedMixin,
return
merged_acts
def
get_screenshot
(
self
,
timeout
=
5
):
queue_name
=
self
.
get_remote_queue_name
(
'vm'
)
queue_name
=
self
.
get_remote_queue_name
(
"vm"
,
"fast"
)
return
vm_tasks
.
screenshot
.
apply_async
(
args
=
[
self
.
vm_name
],
queue
=
queue_name
)
.
get
(
timeout
=
timeout
)
circle/vm/operations.py
View file @
9d513b83
...
...
@@ -594,7 +594,7 @@ class ScreenshotOperation(InstanceOperation):
if
self
.
instance
.
status
not
in
[
'RUNNING'
]:
raise
self
.
instance
.
WrongStateError
(
self
.
instance
)
def
_operation
(
self
,
instance
,
user
):
def
_operation
(
self
):
return
self
.
instance
.
get_screenshot
(
timeout
=
20
)
...
...
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