Skip to content

Commit 4def8bc

Browse files
authored
add job kind to job executor logging (#348)
1 parent 2c0e11f commit 4def8bc

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

job_executor.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -247,6 +247,7 @@ func (e *jobExecutor) reportResult(ctx context.Context, res *jobExecutorResult)
247247
if res.Err != nil && errors.As(res.Err, &snoozeErr) {
248248
e.Logger.InfoContext(ctx, e.Name+": Job snoozed",
249249
slog.Int64("job_id", e.JobRow.ID),
250+
slog.String("job_kind", e.JobRow.Kind),
250251
slog.Duration("duration", snoozeErr.duration),
251252
)
252253
nextAttemptScheduledAt := time.Now().Add(snoozeErr.duration)
@@ -293,6 +294,7 @@ func (e *jobExecutor) reportError(ctx context.Context, res *jobExecutorResult) {
293294
logAttrs := []any{
294295
slog.String("error", res.ErrorStr()),
295296
slog.Int64("job_id", e.JobRow.ID),
297+
slog.String("job_kind", e.JobRow.Kind),
296298
}
297299

298300
switch {

0 commit comments

Comments
 (0)