Skip to content

Commit

Permalink
Patches for staging
Browse files Browse the repository at this point in the history
Updated baw-workers version & removed default backtrace silencers.
  • Loading branch information
atruskie committed Oct 18, 2016
1 parent 239df30 commit f5de42a
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 5 deletions.
2 changes: 1 addition & 1 deletion Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,7 @@ gem 'resque', '~> 1.25.2'
gem 'resque-job-stats', git: 'https://github.com/echannel/resque-job-stats.git', branch: :master, ref: '8932c036ae'
gem 'resque-status', '~> 0.5.0'
# set to a specific commit when releasing to master branch
gem 'baw-workers', git: 'https://github.com/QutBioacoustics/baw-workers.git', branch: :master, ref: 'fe0022b4defaf1b39288496150946b6028d998db'
gem 'baw-workers', git: 'https://github.com/QutBioacoustics/baw-workers.git', branch: :master, ref: 'f14d46ebebf556a66057cb1abe58d00ff50a864c'


# Gems restricted by environment and/or platform
Expand Down
4 changes: 2 additions & 2 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@ GIT

GIT
remote: https://github.com/QutBioacoustics/baw-workers.git
revision: fe0022b4defaf1b39288496150946b6028d998db
ref: fe0022b4defaf1b39288496150946b6028d998db
revision: f14d46ebebf556a66057cb1abe58d00ff50a864c
ref: f14d46ebebf556a66057cb1abe58d00ff50a864c
branch: master
specs:
baw-workers (0.5.0)
Expand Down
2 changes: 1 addition & 1 deletion app/models/analysis_jobs_item.rb
Original file line number Diff line number Diff line change
Expand Up @@ -320,7 +320,7 @@ def add_to_queue
rescue => e
# Note: exception used to be swallowed. We might need better error handling here later on.
Rails.logger.error "An error occurred when enqueuing an analysis job item: #{e}"
raise e
raise
end

@enqueue_results = {result: result, error: error}
Expand Down
4 changes: 3 additions & 1 deletion config/initializers/backtrace_silencers.rb
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,9 @@
# Rails.backtrace_cleaner.add_silencer { |line| line =~ /my_noisy_library/ }

# You can also remove all the silencers if you're trying to debug a problem that might stem from framework code.
# Rails.backtrace_cleaner.remove_silencers!
# Patch the standard silencer from https://github.com/rails/rails/blob/69ab3eb57e8387b0dd9d672b5e8d9185395baa03/railties/lib/rails/backtrace_cleaner.rb
# Otherwise it silences backtrace components in gems. This is especially bad for diagnosing errors inside our own gems!
Rails.backtrace_cleaner.remove_silencers!

# Rails.backtrace_cleaner.add_filter { |line| line.gsub(Rails.root.to_s, '') } # strip the Rails.root prefix
# Rails.backtrace_cleaner.add_silencer { |line| line =~ /mongrel|rubygems/ } # skip any lines from mongrel or rubygems

0 comments on commit f5de42a

Please sign in to comment.