Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
Fukász Rómeó Ervin
/
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
18b4e814
authored
Feb 25, 2014
by
Guba Sándor
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
storage: fixed docstring remore_task
parent
c0c966cd
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
14 additions
and
6 deletions
+14
-6
circle/storage/tasks/periodic_tasks.py
+14
-6
No files found.
circle/storage/tasks/periodic_tasks.py
View file @
18b4e814
...
@@ -12,10 +12,12 @@ logger = logging.getLogger(__name__)
...
@@ -12,10 +12,12 @@ logger = logging.getLogger(__name__)
@celery.task
@celery.task
def
garbage_collector
(
timeout
=
15
):
def
garbage_collector
(
timeout
=
15
):
""" Garbage collector for disk images.
""" Garbage collector for disk images.
Moves 1 day old deleted images to trash folder.
If there is not enough free space on datastore (default 10
%
)
deletes oldest images from trash.
Moves 1 day old deleted images to trash folder.
:param timeout: Seconds before TimeOut exception
If there is not enough free space on datastore (default 10
%
)
:type timeoit: int
deletes oldest images from trash.
"""
"""
for
ds
in
DataStore
.
objects
.
all
():
for
ds
in
DataStore
.
objects
.
all
():
time_before
=
timezone
.
now
()
-
timedelta
(
days
=
1
)
time_before
=
timezone
.
now
()
-
timedelta
(
days
=
1
)
...
@@ -37,8 +39,11 @@ def garbage_collector(timeout=15):
...
@@ -37,8 +39,11 @@ def garbage_collector(timeout=15):
@celery.task
@celery.task
def
list_orphan_disks
(
timeout
=
15
):
def
list_orphan_disks
(
timeout
=
15
):
""" List disk image files without Disk object in the database.
"""List disk image files without Disk object in the database.
Exclude cloud-xxxxxxxx.dump format images.
Exclude cloud-xxxxxxxx.dump format images.
:param timeout: Seconds before TimeOut exception
:type timeoit: int
"""
"""
import
re
import
re
for
ds
in
DataStore
.
objects
.
all
():
for
ds
in
DataStore
.
objects
.
all
():
...
@@ -53,7 +58,10 @@ def list_orphan_disks(timeout=15):
...
@@ -53,7 +58,10 @@ def list_orphan_disks(timeout=15):
@celery.task
@celery.task
def
list_missing_disks
(
timeout
=
15
):
def
list_missing_disks
(
timeout
=
15
):
""" List Disk objects without disk image files.
"""List Disk objects without disk image files.
:param timeout: Seconds before TimeOut exception
:type timeoit: int
"""
"""
for
ds
in
DataStore
.
objects
.
all
():
for
ds
in
DataStore
.
objects
.
all
():
queue_name
=
ds
.
get_remote_queue_name
(
'storage'
)
queue_name
=
ds
.
get_remote_queue_name
(
'storage'
)
...
...
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