From 53b0041b096890f8e971c25ea87f2779d3a338e9 Mon Sep 17 00:00:00 2001 From: Aaron3S Date: Thu, 27 Oct 2022 19:25:48 +0800 Subject: [PATCH] feat: celery task api --- apps/ops/models/celery.py | 9 --------- 1 file changed, 9 deletions(-) diff --git a/apps/ops/models/celery.py b/apps/ops/models/celery.py index b7e1296a0..2cc989fc3 100644 --- a/apps/ops/models/celery.py +++ b/apps/ops/models/celery.py @@ -23,15 +23,6 @@ class CeleryTask(models.Model): "comment": getattr(task, 'comment', None), "queue": getattr(task, 'queue', 'default') } - - @property - def success_count(self): - return CeleryTaskExecution.objects.filter(name=self.name, state='SUCCESS').count() - - @property - def publish_count(self): - return CeleryTaskExecution.objects.filter(name=self.name).count() - @property def state(self): last_five_executions = CeleryTaskExecution.objects.filter(name=self.name).order_by('-date_published')[:5]