This repository has been archived by the owner on Oct 24, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
i718 Add auxiliary worker to run different queues #723
Merged
bkiahstroud
merged 18 commits into
main
from
i718-separate-fast-lane-import-queue-and-worker
Feb 23, 2024
Merged
Changes from all commits
Commits
Show all changes
18 commits
Select commit
Hold shift + click to select a range
c5b6999
add auxiliary worker to run different queues
bkiahstroud 9cf9a7f
add workerAuxiliary as extra deploy (dev)
bkiahstroud 5988af2
replace JSON syntax with YAML syntax
bkiahstroud e9cc816
use ENV var for :auxiliary queue priority
bkiahstroud 5f55100
fix redis url in dev helm deploy templ
bkiahstroud f1e57ff
set GOOD_JOB_QUEUES on each worker specifically
bkiahstroud 4258d94
pull extraEnvVars into auxiliary worker directly
bkiahstroud 16e1bc3
helm is picky about order of env variables
bkiahstroud 98cf7c1
bring container config inline with initContainers
bkiahstroud 4afc1df
explicitly duplicate extraEnvVars
bkiahstroud f1aa344
attempt to merge all vars separately
bkiahstroud e769ef2
attempt using templ to merge ENV var lists
bkiahstroud a1fb775
use unique var for auxiliary worker
bkiahstroud d984f6d
fix good_job command in workers
bkiahstroud c8fbed6
use ENV variables to configure worker queues
bkiahstroud 9ffd497
two exec calls doesn't work
bkiahstroud c3e3028
export didn't reliably set ENV var
bkiahstroud 0d23406
auxiliary is hard to spell
bkiahstroud File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,4 @@ | ||
AUXILIARY_QUEUE_PRIORITY=100 | ||
CHROME_HOSTNAME=chrome | ||
DATABASE_ADAPTER=postgresql | ||
DATABASE_HOST=db | ||
|
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 |
---|---|---|
@@ -1,8 +1,18 @@ | ||
# frozen_string_literal: true | ||
|
||
class ApplicationJob < ActiveJob::Base | ||
before_enqueue :set_auxiliary_queue_priority | ||
|
||
# limit to 5 attempts | ||
retry_on StandardError, wait: :exponentially_longer, attempts: 5 do |_job, _exception| | ||
# Log error, do nothing, etc. | ||
end | ||
|
||
private | ||
|
||
def set_auxiliary_queue_priority | ||
return unless queue_name.to_sym == :auxiliary | ||
|
||
self.priority = ENV.fetch('AUXILIARY_QUEUE_PRIORITY', 100).to_i | ||
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
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.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This setting of priority will clobber the nuanced priority of a later PR.