[Webservice] Fix overview page with newly submitted jobs
Description
We've occasionally noticed that the overview page fails, then works again a minute later. This should fix that.
The cause was that the overview page expects the elapsed time for a job in the DB to be a string, like '12:34'
. This is what the job monitor stores, but when the webservice submits a job, it was storing an integer 0
in that field, which caused an exception in the overview server code.
It would be more satisfying to store an integer number of seconds and format it into minutes (etc.) when needed. But it seems that squeue
can only give us the time pre-formatted, so storing it that way is less effort than parsing it and formatting it again.
I also fixed a silly mistake I made in the systemd unit files. I had added a comment and not bothered to test again, because obviously a comment can't break anything...
How Has This Been Tested?
Deployed on xcaltst, submitted some jobs from test_metadata.
Relevant Documents (optional)
Types of changes
- Bug fix (non-breaking change which fixes an issue)
Checklist:
- My code follows the code style of this project.