Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
CIRCLE
/
cloud
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
94
Merge Requests
10
Pipelines
Wiki
Snippets
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
6c98c553
authored
Nov 27, 2013
by
Dudás Ádám
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
storage: improve documentation
parent
5ca86fb9
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
1 deletions
+11
-1
circle/storage/models.py
+11
-1
No files found.
circle/storage/models.py
View file @
6c98c553
...
@@ -49,7 +49,8 @@ class Disk(TimeStampedModel):
...
@@ -49,7 +49,8 @@ class Disk(TimeStampedModel):
size
=
FileSizeField
()
size
=
FileSizeField
()
base
=
ForeignKey
(
'self'
,
blank
=
True
,
null
=
True
,
base
=
ForeignKey
(
'self'
,
blank
=
True
,
null
=
True
,
related_name
=
'derivatives'
)
related_name
=
'derivatives'
)
ready
=
BooleanField
(
default
=
False
)
ready
=
BooleanField
(
default
=
False
,
help_text
=
_
(
"The associated resource is ready."
))
dev_num
=
CharField
(
default
=
'a'
,
max_length
=
1
,
dev_num
=
CharField
(
default
=
'a'
,
max_length
=
1
,
verbose_name
=
_
(
"device number"
))
verbose_name
=
_
(
"device number"
))
destroyed
=
DateTimeField
(
blank
=
True
,
default
=
None
,
null
=
True
)
destroyed
=
DateTimeField
(
blank
=
True
,
default
=
None
,
null
=
True
)
...
@@ -163,6 +164,13 @@ class Disk(TimeStampedModel):
...
@@ -163,6 +164,13 @@ class Disk(TimeStampedModel):
:param self: the disk model to reify
:param self: the disk model to reify
:type self: storage.models.Disk
:type self: storage.models.Disk
:param user: The user who's issuing the command.
:type user: django.contrib.auth.models.User
:param task_uuid: The task's UUID, if the command is being executed
asynchronously.
:type task_uuid: str
:return: True if a new reification of the disk has been created;
:return: True if a new reification of the disk has been created;
otherwise, False.
otherwise, False.
:rtype: bool
:rtype: bool
...
@@ -212,6 +220,8 @@ class Disk(TimeStampedModel):
...
@@ -212,6 +220,8 @@ class Disk(TimeStampedModel):
return
True
return
True
def
destroy_async
(
self
,
user
=
None
):
def
destroy_async
(
self
,
user
=
None
):
"""Execute destroy asynchronously.
"""
return
local_tasks
.
destroy
.
apply_async
(
args
=
[
self
,
user
],
return
local_tasks
.
destroy
.
apply_async
(
args
=
[
self
,
user
],
queue
=
'localhost.man'
)
queue
=
'localhost.man'
)
...
...
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