Update logic for update_seen of clients

This commit is contained in:
2018-02-19 10:33:09 +01:00
parent 45dea64599
commit e3deead94b
5 changed files with 60 additions and 3 deletions

View File

@@ -102,7 +102,25 @@ class Accounting(models.Model):
verbose_name_plural = "Buchhaltungseinträge"
class ClientData(models.Model):
uuid = models.UUIDField(verbose_name="Identifier")
last_seen = models.DateTimeField(verbose_name="Letzter Update")
def __str__(self):
return '{}, {}'.format(self.uuid, self.last_seen)
class Meta:
verbose_name = "Client Data logs"
verbose_name_plural = "Client Data logs"
@receiver(post_save, sender=LocationData)
def test(sender, **kwargs):
from .tasks import process_location_data
process_location_data()
@receiver(post_save, sender=ClientData)
def test(sender, **kwargs):
from .tasks import process_client_data
process_client_data()