Skip to content

Commit

Permalink
feat: new background work process
Browse files Browse the repository at this point in the history
This removes all previous dependencies on RabbitMQ and the need to run separate cron and requeueing processes.
  • Loading branch information
adamcooke committed Feb 14, 2024
1 parent 485d60f commit 003bd80
Show file tree
Hide file tree
Showing 68 changed files with 1,639 additions and 1,181 deletions.
1 change: 1 addition & 0 deletions .rubocop.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ AllCops:
- "db/schema.rb"
# Fixes missing gem exception when running Rubocop on GitHub Actions.
- "vendor/bundle/**/*"
- lib/tasks/auto_annotate_models.rake

# Always use double quotes
Style/StringLiterals:
Expand Down
3 changes: 1 addition & 2 deletions Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,8 @@ gem "authie"
gem "autoprefixer-rails"
gem "basic_ssl"
gem "bcrypt"
gem "bunny"
gem "changey"
gem "chronic"
gem "clockwork"
gem "dotenv-rails"
gem "dynamic_form"
gem "encrypto_signo"
Expand Down Expand Up @@ -55,4 +53,5 @@ group :development do
gem "rubocop"
gem "rubocop-rails"
gem "timecop"
gem "webmock"
end
27 changes: 13 additions & 14 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,8 @@ GEM
minitest (>= 5.1)
tzinfo (~> 2.0)
zeitwerk (~> 2.3)
amq-protocol (2.3.2)
addressable (2.8.6)
public_suffix (>= 2.0.2, < 6.0)
annotate (3.2.0)
activerecord (>= 3.2, < 8.0)
rake (>= 10.4, < 14.0)
Expand All @@ -71,17 +72,12 @@ GEM
execjs (~> 2)
basic_ssl (1.0.3)
bcrypt (3.1.18)
bigdecimal (3.1.6)
builder (3.2.4)
bunny (2.20.3)
amq-protocol (~> 2.3, >= 2.3.1)
sorted_set (~> 1, >= 1.0.2)
byebug (11.1.3)
changey (1.1.0)
activerecord (>= 4.2, < 7)
chronic (0.10.2)
clockwork (3.0.2)
activesupport
tzinfo
coffee-rails (5.0.0)
coffee-script (>= 2.2.0)
railties (>= 5.2.0)
Expand All @@ -90,6 +86,9 @@ GEM
execjs
coffee-script-source (1.12.2)
concurrent-ruby (1.2.3)
crack (1.0.0)
bigdecimal
rexml
crass (1.0.6)
database_cleaner (2.0.2)
database_cleaner-active_record (>= 2, < 3)
Expand Down Expand Up @@ -125,6 +124,7 @@ GEM
temple (>= 0.8.2)
thor
tilt
hashdiff (1.1.0)
hashie (5.0.0)
highline (2.1.0)
i18n (1.14.1)
Expand Down Expand Up @@ -193,6 +193,7 @@ GEM
parallel (1.22.1)
parser (3.2.1.1)
ast (~> 2.4.1)
public_suffix (5.0.4)
puma (6.4.2)
nio4r (~> 2.0)
racc (1.7.3)
Expand Down Expand Up @@ -229,7 +230,6 @@ GEM
thor (~> 1.0)
rainbow (3.1.1)
rake (13.1.0)
rbtree (0.4.6)
regexp_parser (2.7.0)
resolv (0.2.2)
rexml (3.2.5)
Expand Down Expand Up @@ -289,10 +289,6 @@ GEM
sentry-ruby (~> 5.8.0)
sentry-ruby (5.8.0)
concurrent-ruby (~> 1.0, >= 1.0.2)
set (1.0.3)
sorted_set (1.0.3)
rbtree
set (~> 1.0)
sprockets (4.2.0)
concurrent-ruby (~> 1.0)
rack (>= 2.2.4, < 4)
Expand All @@ -313,6 +309,10 @@ GEM
uglifier (4.2.0)
execjs (>= 0.3.0, < 3)
unicode-display_width (2.4.2)
webmock (3.20.0)
addressable (>= 2.8.0)
crack (>= 0.3.2)
hashdiff (>= 0.4.0, < 2.0.0)
websocket-driver (0.7.6)
websocket-extensions (>= 0.1.0)
websocket-extensions (0.1.5)
Expand All @@ -330,11 +330,9 @@ DEPENDENCIES
autoprefixer-rails
basic_ssl
bcrypt
bunny
byebug
changey
chronic
clockwork
coffee-rails (~> 5.0)
database_cleaner
dotenv-rails
Expand Down Expand Up @@ -371,6 +369,7 @@ DEPENDENCIES
timecop
turbolinks (~> 5)
uglifier (>= 1.3.0)
webmock

BUNDLED WITH
2.4.9
4 changes: 1 addition & 3 deletions Procfile.dev
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
web: bundle exec puma -C config/puma.rb
worker: bundle exec ruby script/worker.rb
cron: bundle exec rake postal:cron
smtp: bundle exec rake postal:smtp_server
requeuer: bundle exec rake postal:requeuer
smtp: bundle exec ruby script/smtp_server.rb
16 changes: 0 additions & 16 deletions app/jobs/action_deletion_job.rb

This file was deleted.

17 changes: 0 additions & 17 deletions app/jobs/action_deletions_job.rb

This file was deleted.

12 changes: 0 additions & 12 deletions app/jobs/prune_suppression_lists_job.rb

This file was deleted.

12 changes: 0 additions & 12 deletions app/jobs/prune_webhook_requests_job.rb

This file was deleted.

9 changes: 0 additions & 9 deletions app/jobs/requeue_webhooks_job.rb

This file was deleted.

9 changes: 0 additions & 9 deletions app/jobs/send_notifications_job.rb

This file was deleted.

29 changes: 0 additions & 29 deletions app/jobs/send_webhook_job.rb

This file was deleted.

9 changes: 0 additions & 9 deletions app/jobs/sleep_job.rb

This file was deleted.

8 changes: 0 additions & 8 deletions app/jobs/tidy_raw_messages_job.rb

This file was deleted.

Loading

0 comments on commit 003bd80

Please sign in to comment.