diff options
| author | AppleDash <[email protected]> | 2022-10-10 06:53:01 -0400 |
|---|---|---|
| committer | AppleDash <[email protected]> | 2022-10-10 06:53:01 -0400 |
| commit | ccb591a4fa03078dd55e833b8a72b9a525908ea1 (patch) | |
| tree | baa216bf80581eef3c91e29337dfdf7ae4422a4e | |
| parent | 291ae0a5534750ea9bad6679c8220c756cde7a14 (diff) | |
Few fixes, notifications should no longer fail on bad actors, some backtrace silencing
| -rw-r--r-- | Procfile.dev | 5 | ||||
| -rw-r--r-- | app/jobs/notification_job.rb | 2 | ||||
| -rw-r--r-- | config/initializers/backtrace_silencers.rb | 1 | ||||
| -rw-r--r-- | config/sidekiq-normal.yml | 1 | ||||
| -rw-r--r-- | test/fixtures/image_files/identical_post_optimize_1.png | bin | 0 -> 160095 bytes | |||
| -rw-r--r-- | test/fixtures/image_files/identical_post_optimize_2.png | bin | 0 -> 164530 bytes |
6 files changed, 6 insertions, 3 deletions
diff --git a/Procfile.dev b/Procfile.dev index a63be33..4167b94 100644 --- a/Procfile.dev +++ b/Procfile.dev @@ -1,3 +1,4 @@ sidekiq: bundle exec sidekiq -c 6 -q high -q mailers -q image_processing -q video_processing -q low -q rebuilds -q thumb_regeneration -puma: bundle exec falcon serve -v -b http://0.0.0.0:8080 -# logs: tail -f log/development.logjs: yarn build --watch +puma: puma -b tcp://0.0.0.0:8080 +# logs: tail -f log/development.log +# js: yarn build --watch diff --git a/app/jobs/notification_job.rb b/app/jobs/notification_job.rb index 823067c..10e6d35 100644 --- a/app/jobs/notification_job.rb +++ b/app/jobs/notification_job.rb @@ -26,5 +26,7 @@ class NotificationJob < ApplicationJob unique_by: [:notification_id, :user_id] ) end + rescue ActiveRecord::RecordNotFound => e + Rails.logger.warn "NotificationJob: #{actor_class} #{actor_id} not found: #{e}" end end diff --git a/config/initializers/backtrace_silencers.rb b/config/initializers/backtrace_silencers.rb new file mode 100644 index 0000000..62bbdce --- /dev/null +++ b/config/initializers/backtrace_silencers.rb @@ -0,0 +1 @@ +Rails.backtrace_cleaner.add_silencer { |line| /gems\/(sidekiq|activesupport|activejob|newrelic|i18n)/.match? line } diff --git a/config/sidekiq-normal.yml b/config/sidekiq-normal.yml index 4bae697..93b2c31 100644 --- a/config/sidekiq-normal.yml +++ b/config/sidekiq-normal.yml @@ -6,4 +6,3 @@ - ['imports', 4] - ['low', 3] - ['default', 3] - diff --git a/test/fixtures/image_files/identical_post_optimize_1.png b/test/fixtures/image_files/identical_post_optimize_1.png Binary files differnew file mode 100644 index 0000000..7706da8 --- /dev/null +++ b/test/fixtures/image_files/identical_post_optimize_1.png diff --git a/test/fixtures/image_files/identical_post_optimize_2.png b/test/fixtures/image_files/identical_post_optimize_2.png Binary files differnew file mode 100644 index 0000000..929a835 --- /dev/null +++ b/test/fixtures/image_files/identical_post_optimize_2.png |
