-# This file is part of Wolnelektury, licensed under GNU Affero GPLv3 or later.
-# Copyright © Fundacja Nowoczesna Polska. See NOTICE for more information.
+# This file is part of Wolne Lektury, licensed under GNU Affero GPLv3 or later.
+# Copyright © Fundacja Wolne Lektury. See NOTICE for more information.
#
from os.path import join, isfile
from django.urls import reverse
from django.db import models
from waiter.settings import WAITER_URL, WAITER_MAX_QUEUE
from waiter.utils import check_abspath
#
from os.path import join, isfile
from django.urls import reverse
from django.db import models
from waiter.settings import WAITER_URL, WAITER_MAX_QUEUE
from waiter.utils import check_abspath
class WaitedFile(models.Model):
path = models.CharField(max_length=255, unique=True, db_index=True)
task_id = models.CharField(max_length=128, db_index=True, null=True, blank=True)
class WaitedFile(models.Model):
path = models.CharField(max_length=255, unique=True, db_index=True)
task_id = models.CharField(max_length=128, db_index=True, null=True, blank=True)
- waited.task = task_creator(check_abspath(path), waited.pk)
- waited.task_id = waited.task.task_id
+ task = task_creator(check_abspath(path), waited.pk)
+ waited.task_id = task.task_id
waited.description = description
waited.save()
return reverse("waiter", args=[path])
waited.description = description
waited.save()
return reverse("waiter", args=[path])