fixed importer threading stuff

This commit is contained in:
vabene1111
2021-03-18 18:08:22 +01:00
parent 906da25301
commit af1bc19fd8
6 changed files with 58 additions and 31 deletions

View File

@@ -241,6 +241,20 @@ class SyncLog(models.Model, PermissionModelMixin):
return f"{self.created_at}:{self.sync} - {self.status}"
class ImportLog(models.Model, PermissionModelMixin):
type = models.CharField(max_length=32)
running = models.BooleanField(default=True)
msg = models.TextField(default="")
created_at = models.DateTimeField(auto_now_add=True)
created_by = models.ForeignKey(User, on_delete=models.CASCADE)
objects = ScopedManager(space='space')
space = models.ForeignKey(Space, on_delete=models.CASCADE)
def __str__(self):
return f"{self.created_at}:{self.type} - {self.msg}"
class Keyword(models.Model, PermissionModelMixin):
name = models.CharField(max_length=64)
icon = models.CharField(max_length=16, blank=True, null=True)