Beispiel #1
0
 def get_all_expired(self, expires):
     """Get all expired task results."""
     return self.filter(date_done__lt=now() - maybe_timedelta(expires))
Beispiel #2
0
 def changed(cls, instance, **kwargs):
     if not instance.no_changes:
         cls.objects.update_or_create(ident=1,
                                      defaults={'last_update': now()})