Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
Gelencsér Szabolcs
/
circlestack
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
82d78359
authored
Sep 11, 2013
by
Guba Sándor
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
refactor manager
parent
f4b82dc9
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
13 additions
and
14 deletions
+13
-14
circle/storage/models.py
+2
-1
circle/storage/tasks.py
+11
-13
No files found.
circle/storage/models.py
View file @
82d78359
...
...
@@ -18,7 +18,8 @@ class DataStore(models.Model):
verbose_name
=
_
(
'name'
))
path
=
models
.
CharField
(
max_length
=
200
,
unique
=
True
,
verbose_name
=
_
(
'path'
))
hostname
=
models
.
CharField
(
max_length
=
40
,
unique
=
True
,
verbose_name
=
_
(
'hostname'
))
class
Meta
:
ordering
=
[
'name'
]
verbose_name
=
_
(
'datastore'
)
...
...
circle/storage/tasks.py
View file @
82d78359
import
celery
from
celery.contrib.methods
import
task_method
import
logging
logger
=
logging
.
getLogger
(
__name__
)
class
StorageDriver
:
@celery.task
(
filter
=
task_method
,
name
=
'storagedriver.list_disks'
)
def
list_disks
(
dir
):
@celery.task
(
name
=
'storagedriver.list_disks'
)
def
list_disks
(
dir
):
pass
@celery.task
(
filter
=
task_method
,
name
=
'storagedriver.create_disk'
)
def
create_disk
(
disk_desc
):
@celery.task
(
name
=
'storagedriver.create_disk'
)
def
create_disk
(
disk_desc
):
pass
@celery.task
(
filter
=
task_method
,
name
=
'storagedriver.delete_disk'
)
def
delete_disk
(
json_data
):
# TODO review
@celery.task
(
name
=
'storagedriver.delete_disk'
)
def
delete_disk
(
json_data
):
pass
@celery.task
(
filter
=
task_method
,
name
=
'storagedriver.get_disk'
)
def
get_disk
(
json_data
):
# TODO review
@celery.task
(
name
=
'storagedriver.get_disk'
)
def
get_disk
(
json_data
):
pass
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