pybit icon indicating copy to clipboard operation
pybit copied to clipboard

Add list of recently completed jobs to web front end

Open SiHaswell opened this issue 13 years ago • 4 comments

Would be useful to have a separate list of recently completed jobs (including failed jobs) as they disappear from the 'current jobs' list as soon as they have finished.

SiHaswell avatar Nov 14 '12 16:11 SiHaswell

How to design this? We presumably don't want to modify the existing get_unfinished_jobs() query, as controller uses this.

We probably want a new query taking inspiration from get_unfinished_jobs() and get_job_statuses(), which gets all jobs where status is done, and where the latest status has a timestamp less than x time ago.

jamesbennet avatar Nov 15 '12 11:11 jamesbennet

Not much of a SQL wizard, but im assuming we need to find out how to do DATEDIFFs in PostgreSQL, and SELECT where the timestamp is less than x minutes from Now() or whatever the function is to get CURRENT_TIMESTAMP.

To the documentation!

jamesbennet avatar Nov 15 '12 11:11 jamesbennet

The key bit seems to be something like WHERE time >= (now() - interval '10 min')

jamesbennet avatar Nov 20 '12 13:11 jamesbennet

We also need to add paging, and improve the Dashboard.

jamesbennet avatar Nov 30 '12 10:11 jamesbennet