-
Notifications
You must be signed in to change notification settings - Fork 174
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'next' into delayed-job-rewrite
- Loading branch information
Showing
9 changed files
with
95 additions
and
24 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
temp-bugsnag-lib |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,15 +1,17 @@ | ||
ARG ruby_version | ||
FROM ruby:$ruby_version | ||
|
||
RUN mkdir -p /usr/src/app | ||
WORKDIR /usr/src/app | ||
WORKDIR /bugsnag | ||
COPY temp-bugsnag-lib ./ | ||
|
||
WORKDIR /usr/src/app | ||
COPY app/Gemfile /usr/src/app/ | ||
RUN bundle install | ||
|
||
COPY app/ /usr/src/app | ||
|
||
RUN bundle exec rails generate delayed_job:active_record | ||
RUN bundle exec rake rails:update:bin | ||
RUN bundle exec bin/rails generate delayed_job:active_record | ||
RUN bundle exec rake db:migrate | ||
|
||
CMD ["bundle", "exec", "rake", "jobs:work"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,10 @@ | ||
class TestModel < ApplicationRecord | ||
def self.print | ||
puts "yo" | ||
end | ||
|
||
def self.fail | ||
def self.fail_with_args(a) | ||
raise "uh oh" | ||
end | ||
|
||
def self.fail_with_args(a) | ||
raise "uh oh" | ||
def self.notify | ||
Bugsnag.notify(RuntimeError.new("Handled exception")) | ||
end | ||
end |
13 changes: 12 additions & 1 deletion
13
features/fixtures/delayed_job/app/config/initializers/bugsnag.rb
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,14 @@ | ||
Bugsnag.configure do |config| | ||
config.api_key = "0a336f52d5bc59451e518f3e682209c7" | ||
config.api_key = ENV["BUGSNAG_API_KEY"] || ENV["MAZE_API_KEY"] | ||
config.endpoint = ENV["BUGSNAG_ENDPOINT"] || ENV["MAZE_ENDPOINT"] | ||
config.session_endpoint = ENV["BUGSNAG_ENDPOINT"] || ENV["MAZE_ENDPOINT"] | ||
config.app_type = ENV["MAZE_APP_TYPE"] if ENV.include? "MAZE_APP_TYPE" | ||
config.app_version = ENV["MAZE_APP_VERSION"] if ENV.include? "MAZE_APP_VERSION" | ||
config.auto_notify = ENV["MAZE_AUTO_NOTIFY"] != "false" | ||
config.project_root = ENV["MAZE_PROJECT_ROOT"] if ENV.include? "MAZE_PROJECT_ROOT" | ||
config.ignore_classes << lambda { |ex| ex.class.to_s == ENV["MAZE_IGNORE_CLASS"] } if ENV.include? "MAZE_IGNORE_CLASS" | ||
config.auto_capture_sessions = ENV["MAZE_AUTO_CAPTURE_SESSIONS"] == "true" | ||
config.release_stage = ENV["MAZE_RELEASE_STAGE"] if ENV.include? "MAZE_RELEASE_STAGE" | ||
config.send_code = ENV["MAZE_SEND_CODE"] != "false" | ||
config.send_environment = ENV["MAZE_SEND_ENVIRONMENT"] == "true" | ||
end |
3 changes: 3 additions & 0 deletions
3
features/fixtures/delayed_job/app/config/initializers/delayed_job.rb
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
require 'delayed_job' | ||
|
||
Delayed::Worker.max_attempts = 1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters