mirror of
https://github.com/django-q2/django-q2.git
synced 2026-10-04 22:08:13 +08:00
renamed scheduled task result to 'last run'. Makes more sense
This commit is contained in:
+1
-1
@@ -66,7 +66,7 @@ class ScheduleAdmin(admin.ModelAdmin):
|
|||||||
'schedule_type',
|
'schedule_type',
|
||||||
'repeats',
|
'repeats',
|
||||||
'next_run',
|
'next_run',
|
||||||
'result',
|
'last_run',
|
||||||
'success'
|
'success'
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|||||||
+2
-2
@@ -109,7 +109,7 @@ class Schedule(models.Model):
|
|||||||
next_run = models.DateTimeField(verbose_name=_('Next Run'), default=timezone.now, null=True)
|
next_run = models.DateTimeField(verbose_name=_('Next Run'), default=timezone.now, null=True)
|
||||||
task = models.CharField(max_length=100, editable=False, null=True)
|
task = models.CharField(max_length=100, editable=False, null=True)
|
||||||
|
|
||||||
def result(self):
|
def last_run(self):
|
||||||
if Task.objects.filter(name=self.task).exists():
|
if Task.objects.filter(name=self.task).exists():
|
||||||
task = Task.objects.get(name=self.task)
|
task = Task.objects.get(name=self.task)
|
||||||
if task.success:
|
if task.success:
|
||||||
@@ -125,7 +125,7 @@ class Schedule(models.Model):
|
|||||||
return Task.objects.get(name=self.task).success
|
return Task.objects.get(name=self.task).success
|
||||||
|
|
||||||
success.boolean = True
|
success.boolean = True
|
||||||
result.allow_tags = True
|
last_run.allow_tags = True
|
||||||
|
|
||||||
class Meta:
|
class Meta:
|
||||||
app_label = 'django_q'
|
app_label = 'django_q'
|
||||||
|
|||||||
Reference in New Issue
Block a user