X-Git-Url: https://git.mdrn.pl/wolnelektury.git/blobdiff_plain/7ef4abfc9ef8f8835f83cec90040a8d91a659d00..a6145bb10676f304d4a3de6789c383f1f9326055:/apps/waiter/models.py diff --git a/apps/waiter/models.py b/apps/waiter/models.py index 10f92897e..e64e4dbba 100644 --- a/apps/waiter/models.py +++ b/apps/waiter/models.py @@ -1,3 +1,7 @@ +# -*- coding: utf-8 -*- +# This file is part of Wolnelektury, licensed under GNU Affero GPLv3 or later. +# Copyright © Fundacja Nowoczesna Polska. See NOTICE for more information. +# from os.path import join, isfile from django.core.urlresolvers import reverse from django.db import models @@ -15,7 +19,7 @@ class WaitedFile(models.Model): @classmethod def exists(cls, path): """Returns opened file or None. - + `path` is relative to WAITER_ROOT. Won't open a path leading outside of WAITER_ROOT. """ @@ -37,7 +41,7 @@ class WaitedFile(models.Model): def is_stale(self): if self.task is None: - # Race; just let the other task roll. + # Race; just let the other task roll. return False if self.task.status not in (u'PENDING', u'STARTED', u'SUCCESS', u'RETRY'): return True