Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
Gelencsér Szabolcs
/
storagedriver
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Wiki
Members
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
d383d7cd
authored
Jul 08, 2014
by
Guba Sándor
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
merge task is now abortable
parent
f3a27e66
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
5 deletions
+9
-5
storagedriver.py
+9
-5
No files found.
storagedriver.py
View file @
d383d7cd
...
...
@@ -58,11 +58,15 @@ def snapshot(json_data):
disk
.
snapshot
()
@celery.task
()
def
merge
(
old_json
,
new_json
):
disk
=
Disk
.
deserialize
(
old_json
)
new_disk
=
Disk
.
deserialize
(
new_json
)
disk
.
merge
(
new_disk
)
class
merge
(
AbortableTask
):
time_limit
=
18000
def
run
(
self
,
**
kwargs
):
old_json
=
kwargs
[
'old_json'
]
new_json
=
kwargs
[
'new_json'
]
disk
=
Disk
.
deserialize
(
old_json
)
new_disk
=
Disk
.
deserialize
(
new_json
)
disk
.
merge
(
self
,
new_disk
)
@celery.task
()
...
...
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