Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
Gyuricska Milán
/
cloud
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
49173ff9
authored
Sep 27, 2013
by
Dudás Ádám
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
storage: add stubs for restore functionality
parent
aec82004
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
15 additions
and
0 deletions
+15
-0
circle/storage/models.py
+10
-0
circle/storage/tasks/local_tasks.py
+5
-0
No files found.
circle/storage/models.py
View file @
49173ff9
...
...
@@ -189,6 +189,16 @@ class Disk(TimeStampedModel):
local_tasks
.
remove
.
apply_async
(
args
=
[
self
,
user
],
queue
=
'localhost.man'
)
def
restore
(
self
,
user
=
None
,
task_uuid
=
None
):
"""Restore removed disk.
"""
# TODO
pass
def
restore_async
(
self
,
user
=
None
):
local_tasks
.
restore
.
apply_async
(
args
=
[
self
,
user
],
queue
=
'localhost.man'
)
class
DiskActivity
(
TimeStampedModel
):
activity_code
=
CharField
(
verbose_name
=
_
(
'activity_code'
),
max_length
=
100
)
...
...
circle/storage/tasks/local_tasks.py
View file @
49173ff9
...
...
@@ -9,3 +9,8 @@ def deploy(disk, user):
@celery.task
def
remove
(
disk
,
user
):
disk
.
remove
(
task_uuid
=
remove
.
request
.
id
,
user
=
user
)
@celery.task
def
restore
(
disk
,
user
):
disk
.
restore
(
task_uuid
=
restore
.
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