Skip to content
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

Don't include enqueuing info when job wasn't enqueued #1

Merged
merged 1 commit into from Oct 6, 2023

Conversation

dustinbrownman
Copy link
Owner

@dustinbrownman dustinbrownman commented Oct 3, 2023

Motivation / Background

This Pull Request was created to fix a small bug introduced in rails#48066.

Detail

This changes the logged message when a job is started. Before, the logged message always attempted to include the enqueued_at info. Unfortunately, for jobs that are run with perform_now, they are not enqueued and instead executed immediately. This left enqueued_at as nil which in turn caused a NoMethodError to be raised when attempting to call utc on the nil value.

Checklist

Before submitting the PR make sure the following are checked:

  • This Pull Request is related to one change. Changes that are unrelated should be opened in separate PRs.
  • Commit message has a detailed description of what changed and why. If this PR fixes a related issue include it in the commit message. Ex: [Fix #issue-number]
  • Tests are added or updated if you fix a bug or add a feature.
  • CHANGELOG files are updated for the changed libraries if there is a behavior change or additional feature. Minor bug fixes and documentation changes should not be included.

@dustinbrownman dustinbrownman merged this pull request into main Oct 6, 2023
@dustinbrownman dustinbrownman deleted the dustinbrownman/fix-perform-start-logging branch October 6, 2023 15:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
1 participant