removed some unused code

site-osm-baustelle
Hartmut Holzgraefe 2022-08-16 09:36:57 +00:00
rodzic 0bcf9f057c
commit 7441f47820
1 zmienionych plików z 0 dodań i 13 usunięć

Wyświetl plik

@ -51,19 +51,6 @@ class MapRenderingJobManager(models.Manager):
def queue_size(self):
return MapRenderingJob.objects.filter(status=0).count()
# We try to find a rendered map from the last 15 days, which still
# has its thumbnail present.
def get_random_with_thumbnail(self):
fifteen_days_before = datetime.now() - timedelta(15)
maps = (MapRenderingJob.objects.filter(status=2)
.filter(submission_time__gte=fifteen_days_before)
.filter(resultmsg='ok')
.order_by('?')[0:10])
for m in maps:
if m.get_thumbnail():
return m
return None
def get_by_filename(self, name):
"""Tries to find the parent MapRenderingJob of a given file from its
filename. Both the job ID found in the first part of the prefix and the