Skip to content

Commit

Permalink
job-manager/jobtap: use common exception code
Browse files Browse the repository at this point in the history
Problem: flux_jobtap_raise_exception() doesn't publish the
job-exception event message.

Use raise_job_exception() to avoid code duplication rather
than addressing the issue in situ.

Fixes flux-framework#5306
  • Loading branch information
garlick committed Jul 6, 2023
1 parent 5d4e261 commit f50f2c5
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions src/modules/job-manager/jobtap.c
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@
#include "prioritize.h"
#include "conf.h"
#include "event.h"
#include "raise.h"
#include "jobtap.h"
#include "jobtap-internal.h"

Expand Down Expand Up @@ -1931,13 +1932,12 @@ static int jobtap_job_vraise (struct jobtap *jobtap,
char note [1024];
if (vsnprintf (note, sizeof (note), fmt, ap) >= sizeof (note))
note[sizeof(note) - 2] = '+';
return event_job_post_pack (jobtap->ctx->event,
job, "exception", 0,
"{ s:s s:i s:i s:s }",
"type", type,
"severity", severity,
"userid", FLUX_USERID_UNKNOWN,
"note", note);
return raise_job_exception (jobtap->ctx,
job,
type,
severity,
FLUX_USERID_UNKNOWN,
note);
}

static int jobtap_job_raise (struct jobtap *jobtap,
Expand Down

0 comments on commit f50f2c5

Please sign in to comment.