Small tweaks to the DBCK utility

Signed-off-by: Maxime Petazzoni <maxime.petazzoni@bulix.org>
stable
Maxime Petazzoni 2010-03-20 14:01:15 +01:00
rodzic d496ee018d
commit 23f17a1c2f
1 zmienionych plików z 2 dodań i 2 usunięć

Wyświetl plik

@ -95,7 +95,7 @@ class MapOSMaticDbck:
"""
def __init__(self, handler=None):
self.jobs = MapRenderingJob.objects.all()
self.jobs = MapRenderingJob.objects.all().order_by('id')
self.handler = handler or DbckHandler()
self.checks = [self.__check_obsolete,
@ -129,7 +129,7 @@ class MapOSMaticDbck:
"""Checks the obsolete status of the given job. If the job is in the
done state (status=2) and does not have all its output files, it's
obselete and should be cleaned."""
if not job.is_done():
if not job.is_done_ok():
return
files = job.output_files()