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

fix: access GoodJob config via Rails.application.config #554

Merged
merged 1 commit into from
May 31, 2024

Conversation

stympy
Copy link
Member

@stympy stympy commented May 29, 2024

Setting GoodJob's error handler with config.good_job.on_thread_error= in an initializer doesn't change GoodJob.on_thread_error by the time our plugin gets loaded.

Setting GoodJob's error handler with config.good_job.on_thread_error= in an initializer doesn't change GoodJob.on_thread_error by the time our plugin gets loaded.
@stympy stympy requested review from joshuap and roelbondoc May 29, 2024 18:00
Copy link
Member

@joshuap joshuap left a comment

Choose a reason for hiding this comment

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

We initialize our plugins after Rails' initializers run, but not necessarily after other gems' callbacks are executed. I think what's probably happening is GoodJob is configuring their stuff after our after_initialize callback runs:

Honeybadger.load_plugins!

This workaround seems OK to me for Rails, but do people ever configure GoodJob directly?

@stympy
Copy link
Member Author

stympy commented May 29, 2024

This workaround seems OK to me for Rails, but do people ever configure GoodJob directly?

I decided to ignore that possibility since this change is just about ActiveJob being used inside Rails. :)

@joshuap
Copy link
Member

joshuap commented May 29, 2024

This workaround seems OK to me for Rails, but do people ever configure GoodJob directly?

I decided to ignore that possibility since this change is just about ActiveJob being used inside Rails. :)

🧠

@stympy stympy merged commit 37b7786 into master May 31, 2024
41 checks passed
@stympy stympy deleted the better-good_job-fix branch July 11, 2024 15:50
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