Skip to content

Commit

Permalink
do not eraise exception on paperclip errors. need to upgrade papercli…
Browse files Browse the repository at this point in the history
…p soon
  • Loading branch information
nllong committed Apr 20, 2019
1 parent 516006f commit 0bc944a
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 5 deletions.
14 changes: 11 additions & 3 deletions server/spec/features/dj_run_simulation_data_point_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -47,8 +47,12 @@

before do
# Look at DatabaseCleaner gem in the future to deal with this.
Project.destroy_all
Delayed::Job.destroy_all
begin
Project.destroy_all
Delayed::Job.destroy_all
rescue Errno::EACCES => e
puts "Cannot unlink files, will try and continue"
end

# I am no longer using this factory for this purpose. It doesn't
# link up everything, so just post the test using the Analysis Gem.
Expand Down Expand Up @@ -245,7 +249,11 @@

RSpec.describe DjJobs::RunSimulateDataPoint, type: :feature, depends_resque: true do
before :each do
Project.destroy_all
begin
Project.destroy_all
rescue Errno::EACCES => e
puts "Cannot unlink files, will try and continue"
end
FactoryBot.create(:project_with_analyses).analyses

@project = Project.first
Expand Down
8 changes: 6 additions & 2 deletions server/spec/features/resque_run_batch_datapoints_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -49,8 +49,12 @@

before do
# Look at DatabaseCleaner gem in the future to deal with this.
Project.destroy_all
Delayed::Job.destroy_all
begin
Project.destroy_all
Delayed::Job.destroy_all
rescue Errno::EACCES => e
puts "Cannot unlink files, will try and continue"
end

Resque.workers.each(&:unregister_worker)
Resque.queues.each { |q| Resque.redis.del "queue:#{q}" }
Expand Down

0 comments on commit 0bc944a

Please sign in to comment.