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

Ensure Sidekiq app_type is not overwritten when rails is a dependency #286

Merged
merged 2 commits into from
Apr 4, 2016

Conversation

Draiken
Copy link
Contributor

@Draiken Draiken commented Mar 29, 2016

This is a fix for #285. It's possible this same bug happens with other integrations, but I only use Sidekiq and didn't verify that.

Sometimes rails is ran as a dependency of another integration (eg. Sidekiq).
But since the rails initializer runs after the integration, the app_type that
is normally set ends up overwritten.

Each integration has it's own logic that determines if rails is a dependency
or the main actor. This flag can now be set by them to make sure the
app_type won't change.
When the Sidekiq::CLI is defined, it means the "bin/sidekiq" was the
entrypoint, so the app_type should be defined as sidekiq and not rails even
if rails is loaded as a dependency

Closes bugsnag#285
@Draiken Draiken force-pushed the sidekiq_app_type_overwritten branch from 61b3657 to 72389be Compare March 29, 2016 11:39
@kattrali
Copy link
Contributor

Thank you for the patch, @Draiken! This is probably a solution which could be applied to Mailman and Resque, though I can take a look at verifying those as well. Looks good.

@kattrali kattrali merged commit b2f119d into bugsnag:master Apr 4, 2016
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.

2 participants