Skip to content
Snippets Groups Projects
Commit f39b3ce0 authored by jwindley's avatar jwindley
Browse files

Report job.start_time as NO_VAL if not yet set; do not pass STARTTIME to Maui if not set.

parent 33862e7e
No related branches found
No related tags found
No related merge requests found
...@@ -256,10 +256,12 @@ wiki_request_t::compose_response( wiki_request_t *request, ...@@ -256,10 +256,12 @@ wiki_request_t::compose_response( wiki_request_t *request,
} }
break; break;
case 't': case 't':
str += field_str; if ( (*(time_t *) val) != (time_t) NO_VAL ) {
str += "="; str += field_str;
str += (*(time_t *) val); str += "=";
str += ";"; str += (*(time_t *) val);
str += ";";
}
break; break;
case 'i': case 'i':
if ( (*(int16_t *) val) != NO_VAL ) { if ( (*(int16_t *) val) != NO_VAL ) {
......
...@@ -90,6 +90,7 @@ struct sched_obj_cache_entry ...@@ -90,6 +90,7 @@ struct sched_obj_cache_entry
* default or missing values. * default or missing values.
*/ */
static int32_t zero_32 = 0; static int32_t zero_32 = 0;
static time_t unspecified_time = (time_t) NO_VAL;
static struct job_details *copy_job_details( struct job_details *from ); static struct job_details *copy_job_details( struct job_details *from );
static void free_job_details( struct job_details *doomed ); static void free_job_details( struct job_details *doomed );
...@@ -593,8 +594,13 @@ sched_get_job_start_time( sched_obj_list_t job_data, ...@@ -593,8 +594,13 @@ sched_get_job_start_time( sched_obj_list_t job_data,
int32_t idx, int32_t idx,
char *type ) char *type )
{ {
time_t start = ( (struct job_record *)job_data->data )[ idx ].start_time;
if ( type ) *type = 't'; if ( type ) *type = 't';
return (void *) &( (struct job_record *)job_data->data )[ idx ].start_time;
if ( start != (time_t) 0 )
return (void *) &( (struct job_record *)job_data->data )[ idx ].start_time;
else
return (void *) &unspecified_time;
} }
/* ************************************************************************ */ /* ************************************************************************ */
......
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