This repository has been archived by the owner on Jan 3, 2025. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Use shoryuken to allow workers to access Rails so we can trigger emai…
…ls from the worker (#602) * fix missing self in email API * remove unnecessary initializers * use shuryuken to enqueue to sqs * correct seeds * switch name in email API * code changes to make shoryuken work * add worker to wca-main network * run rubocop * add QUEUE_NAME to test * stub registration email request * fix test docker compose * stub mailer in bulk update * set a message_group_id * use custom message_deduplication id and message_group_id * run rubocop * use set to change SQS SendMessage Parameters * introduce variables for better readability * change QUEUE_URL to QUEUE_NAME in infra * add entrypoint for worker * add missing parameters * add shoryuken config file * Add +x for entrypoint * add BUILD_TAG to worker as well
- Loading branch information
1 parent
c0f9094
commit d66f6a3
Showing
27 changed files
with
132 additions
and
212 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
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
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
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 was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
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,2 @@ | ||
#!/bin/bash -e | ||
bundle exec shoryuken -R -C config/shoryuken.yml |
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 was deleted.
Oops, something went wrong.
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,25 @@ | ||
# frozen_string_literal: true | ||
|
||
Shoryuken.configure_client do |config| | ||
if Rails.env.local? | ||
config.sqs_client = Aws::SQS::Client.new( | ||
region: EnvConfig.AWS_REGION, | ||
access_key_id: EnvConfig.AWS_ACCESS_KEY_ID, | ||
secret_access_key: EnvConfig.AWS_SECRET_ACCESS_KEY, | ||
endpoint: EnvConfig.LOCALSTACK_ENDPOINT, | ||
verify_checksums: false, | ||
) | ||
end | ||
end | ||
|
||
Shoryuken.configure_server do |config| | ||
if Rails.env.local? | ||
config.sqs_client = Aws::SQS::Client.new( | ||
region: EnvConfig.AWS_REGION, | ||
access_key_id: EnvConfig.AWS_ACCESS_KEY_ID, | ||
secret_access_key: EnvConfig.AWS_SECRET_ACCESS_KEY, | ||
endpoint: EnvConfig.LOCALSTACK_ENDPOINT, | ||
verify_checksums: false, | ||
) | ||
end | ||
end |
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,4 @@ | ||
queues: | ||
- <%= ENV['QUEUE_NAME'] %> | ||
delay: 1 | ||
concurrency: 2 |
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
Oops, something went wrong.