Commit 4098e47f authored by Frank Winkler's avatar Frank Winkler
Browse files

Fixed user name.

parent 967fd3b8
......@@ -14,6 +14,7 @@
#include "src/common/xmalloc.h"
#include "src/common/xstring.h"
#include "src/common/parse_time.h"
#include "src/common/uid.h"
/*
* These variables are required by the generic plugin interface. If they
......@@ -123,14 +124,12 @@ extern int prep_p_prolog_slurmctld(job_record_t *job_ptr, bool *async)
{
int rc = SLURM_SUCCESS;
/* job_ptr->user_name does not work */
// if ( strcmp(job_ptr->user_name, "fwinkler") != 0 &&
// strcmp(job_ptr->user_name, "rotscher") != 0 )
// return rc;
if ( job_ptr->user_id != 1001 )
/* only for testing */
if ( strcmp(uid_to_string_or_null(job_ptr->user_id), "fwinkler") != 0 &&
strcmp(uid_to_string_or_null(job_ptr->user_id), "rotscher") != 0 )
return rc;
slurm_info(PLUGIN_NAME "prep_p_prolog_slurmctld\n");
char *job_data = xmalloc(sizeof(char) * STRING_LEN);
job_data_prolog(job_ptr, &job_data);
......@@ -153,14 +152,12 @@ extern int prep_p_epilog_slurmctld(job_record_t *job_ptr, bool *async)
{
int rc = SLURM_SUCCESS;
/* job_ptr->user_name does not work */
// if ( strcmp(job_ptr->user_name, "fwinkler") != 0 &&
// strcmp(job_ptr->user_name, "rotscher") != 0 )
// return rc;
if ( job_ptr->user_id != 1001 )
/* only for testing */
if ( strcmp(uid_to_string_or_null(job_ptr->user_id), "fwinkler") != 0 &&
strcmp(uid_to_string_or_null(job_ptr->user_id), "rotscher") != 0 )
return rc;
slurm_info(PLUGIN_NAME "prep_p_epilog_slurmctld\n");
char *job_data = xmalloc(sizeof(char) * STRING_LEN);
job_data_epilog(job_ptr, &job_data);
......@@ -202,6 +199,9 @@ static void job_data_prolog(job_record_t *job_ptr, char **job_data)
slurm_make_time_str((&job_ptr->start_time), time_str, 32);
snprintf(*job_data, STRING_LEN, "START_TIME = %s\n", time_str);
//user
snprintf(*job_data + strlen(*job_data), STRING_LEN - strlen(*job_data), "USER = %s\n", uid_to_string_or_null(job_ptr->user_id));
// partition
snprintf(*job_data + strlen(*job_data), STRING_LEN - strlen(*job_data), "PARTITION = %s\n", job_ptr->part_ptr->name);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment