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

Sidekiq improvements #317

Merged
merged 6 commits into from
Aug 20, 2016
Merged

Sidekiq improvements #317

merged 6 commits into from
Aug 20, 2016

Conversation

snmaynard
Copy link
Contributor

@snmaynard snmaynard commented Aug 19, 2016

Fixes #282, #309, #306

@snmaynard snmaynard changed the title Fixes #282, #309, #306 Sidekiq improvements Aug 19, 2016
@@ -51,7 +49,7 @@ class Railtie < Rails::Railtie
ActiveRecord::Base.send(:include, Bugsnag::Rails::ActiveRecordRescue)
end

Bugsnag.configuration.app_type = "rails" unless Bugsnag::Railtie.running_as_dependency
Bugsnag.configuration.app_type = "rails"
Copy link
Contributor Author

Choose a reason for hiding this comment

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

This change relies on the fact that in the other cases (sidekiq etc) we know that we are running in that env. This is definitely a little broad, but I think its OK. This will ultimately be set to rails in the console and in the server case, which is what we want.

It is also initially set to rails in other apps (for example in a sidekiq app that also has rails) but because we later know we are running in a sidekiq app, we change the app_type then to be sidekiq.

@snmaynard
Copy link
Contributor Author

I think this also fixes some bugs with app_type detection and adds some example apps for testing/demo purposes.

@kattrali
Copy link
Contributor

LGTM

@@ -37,4 +37,6 @@ def save
# Auto-load the failure backend
Bugsnag::Resque.add_failure_backend

Bugsnag.configuration.app_type = "resque"
Resque.before_first_fork do
Bugsnag.configuration.app_type = "resque"
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Here I should also add synchronous delivery mechanism

Bugsnag.configuration.app_type = "resque"
Resque.before_first_fork do
Bugsnag.configuration.app_type = "resque"
Bugsnag.configuration.delivery_method = :synchronous
Copy link
Contributor

Choose a reason for hiding this comment

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

Why is this setting synchronous? How does we override this value in resque workers if we don't want it?

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.

4 participants