Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fetch-job-records: add integrity check for records
Problem: There is a case where a job can have an R but not have entered RUN state, and thus, does not receive a "t_run" time. The "flux account-fetch-job-records" script does not verify that the timestamp key-value pairs exist before attempting to insert them into the "jobs" table in the flux-accounting DB, which can result in a KeyError. Add two integrity checks for job records fetched by this script. - When initially fetching jobs that checks that each key-value pair exists before adding it to a list of fetched job records, if a key-value pair is not valid, skip adding the job. - When attempting to insert a job record into the "jobs" table, wrap the INSERT in a try-except block in case a KeyError is raised. If so, just skip adding the job.
- Loading branch information