zoo_data: ajoute une méthode pour récupérer tous les jobs d'une classe d'action (#21198)
This commit is contained in:
parent
72a6dfee6c
commit
2baa23702d
|
@ -225,6 +225,10 @@ class JobQuerySet(QuerySet):
|
|||
def set_unrecoverable_error(self):
|
||||
return self.update(state=self.model.STATE_UNRECOVERABLE_ERROR)
|
||||
|
||||
def by_action(self, action_klass):
|
||||
class_path = self.model.get_classpath(action_klass)
|
||||
return self.filter(**{'content__$classpath': class_path})
|
||||
|
||||
|
||||
class Job(models.Model):
|
||||
'''Store synchronization messages sent to applications'''
|
||||
|
|
Loading…
Reference in New Issue