Skip to content

feat(cronsetup/request-id) Generate a unique request ID for each cron execution Fixes #1126 #1127

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

leo-scalingo
Copy link
Contributor

  • Add a changelog entry in CHANGELOG.md

@leo-scalingo leo-scalingo self-assigned this Mar 31, 2025
@leo-scalingo leo-scalingo force-pushed the feat/1126/cronsetup/request-id branch from 153abf3 to 1f2141f Compare March 31, 2025 16:35
@leo-scalingo leo-scalingo force-pushed the feat/1126/cronsetup/request-id branch from 1f2141f to 405f4fb Compare March 31, 2025 16:36
@leo-scalingo leo-scalingo force-pushed the feat/1126/cronsetup/request-id branch from 405f4fb to 5b37a44 Compare March 31, 2025 16:37
Copy link
Contributor

@john-scalingo john-scalingo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

YES ! YES ! YES ! YES A THOUSAND TIMES !

log = log.WithField("cron-job", j.Name)
log.Debug("Running cron job")
return logger.ToCtx(ctx, log)
requestID, err := uuid.NewV4()
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It shouldn't happen but could you check that there is no RequestID already in the context ?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I could even if indeed it shouldn't happen

Copy link
Member

@curzolapierre curzolapierre left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants