Reverse chronologically sort scheduled jobs

Now that scheduled jobs are mixed in with regular jobs it looks weird
for the sort order to be different. This makes the sort order
consistently go from furthest in the future to furthest in the past.

The old sort order made sense when scheduled jobs were displayed
separately on the dashboard.
This commit is contained in:
Chris Hill-Scott
2020-03-06 09:45:02 +00:00
parent fd480febb4
commit 3ad00adfb3
4 changed files with 11 additions and 10 deletions

View File

@@ -70,7 +70,8 @@ class JobApiClient(NotifyAdminAPIClient):
service_id,
statuses=[self.SCHEDULED_JOB_STATUS]
)['data'],
key=lambda job: job['scheduled_for']
key=lambda job: job['scheduled_for'],
reverse=True,
)
@cache.set('has_jobs-{service_id}')