Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 4 additions & 8 deletions django_cron/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,14 +24,10 @@ def __str__(self):
return "%s (%s)" % (self.code, "Success" if self.is_success else "Fail")

class Meta:
index_together = [
('code', 'is_success', 'ran_at_time'),
('code', 'start_time', 'ran_at_time'),
(
'code',
'start_time',
), # useful when finding latest run (order by start_time) of cron
]
indexes = [models.Index(fields=["code", "is_success", "ran_at_time"]),
models.Index(fields=["code", "start_time", "ran_at_time"]),
models.Index(fields=["code", "start_time"])]
# useful when finding latest run (order by start_time) of cron
app_label = 'django_cron'


Expand Down