Skip to content
Snippets Groups Projects
Commit fbe292d1 authored by Danny Auble's avatar Danny Auble
Browse files

Make it so SQL for rollups will work for jobs without any steps

parent 6f7a64c2
No related branches found
No related tags found
No related merge requests found
......@@ -696,10 +696,10 @@ extern int as_mysql_hourly_rollup(mysql_conn_t *mysql_conn,
query = xstrdup_printf("select %s from \"%s_%s\" as job "
"left outer join \"%s_%s\" as step on "
"job.job_db_inx=step.job_db_inx "
"and (step.id_step>=0) "
"where (job.time_eligible < %ld && "
"(job.time_end >= %ld || "
"job.time_end = 0)) and"
" (step.id_step>=0) "
"job.time_end = 0)) "
"group by job.job_db_inx "
"order by job.id_assoc, "
"job.time_eligible",
......@@ -727,10 +727,12 @@ extern int as_mysql_hourly_rollup(mysql_conn_t *mysql_conn,
time_t row_end = slurm_atoul(row[JOB_REQ_END]);
uint32_t row_acpu = slurm_atoul(row[JOB_REQ_ACPU]);
uint32_t row_rcpu = slurm_atoul(row[JOB_REQ_RCPU]);
uint64_t row_energy = slurm_atoull(row[JOB_REQ_ENERGY]);
uint64_t row_energy = 0;
int loc_seconds = 0;
seconds = 0;
if (row[JOB_REQ_ENERGY])
row_energy = slurm_atoull(row[JOB_REQ_ENERGY]);
if (row_start && (row_start < curr_start))
row_start = curr_start;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment