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