-
Notifications
You must be signed in to change notification settings - Fork 16
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: use a more robust queue system, with retry #54
Closed
Closed
Changes from all commits
Commits
Show all changes
18 commits
Select commit
Hold shift + click to select a range
86faf09
chore: use global snapshot code formatting standard
wa0x6e c8516bf
chore: upgrade nodes types
wa0x6e 4a680f1
chore: Improve typescript
wa0x6e 3df8e31
feat: add queue system
wa0x6e 0d60d9b
feat: add retry strategy to channel's queue
wa0x6e e4f6f2f
fix: rename channels to notifications
wa0x6e cc94596
feat: migrate push notifications to queue
wa0x6e 2ead45d
feat: move discord events to queue
wa0x6e 61b5599
fix: raise error on all non-2xx response status
wa0x6e db8fb62
feat: handle errors and retry on push notification errors
wa0x6e 139eeaa
fix: fix missing field for NOT NULL column
wa0x6e 4f61b6a
Merge branch 'fix-updated-value-on-insert' into add-queue-system
wa0x6e 237435c
chore: improve console logging
wa0x6e 6e71d34
fix: start discord bot explicitly
wa0x6e 1e6ad81
fix: events from unknown proposal should be removed
wa0x6e e7b59b8
feat: retry on discord errors
wa0x6e 77fede9
fix: fix deprecation warning
wa0x6e e3c9723
feat: run express and background task in different processes
wa0x6e 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 |
---|---|---|
|
@@ -8,3 +8,4 @@ SERVICE_PUSHER_BEAMS_INSTANCE_ID= | |
SERVICE_PUSHER_BEAMS_SECRET_KEY= | ||
HUB_URL= | ||
SNAPSHOT_URI= | ||
REDIS_URL= | ||
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 |
---|---|---|
|
@@ -11,13 +11,13 @@ jobs: | |
node-version: [16.10.x] | ||
|
||
steps: | ||
- uses: actions/[email protected] | ||
- name: Use Node.js ${{ matrix.node-version }} | ||
uses: actions/setup-node@v1 | ||
with: | ||
node-version: ${{ matrix.node-version }} | ||
- name: yarn install, build and lint | ||
run: | | ||
yarn install --frozen-lockfile | ||
yarn build | ||
yarn lint | ||
- uses: actions/[email protected] | ||
- name: Use Node.js ${{ matrix.node-version }} | ||
uses: actions/setup-node@v1 | ||
with: | ||
node-version: ${{ matrix.node-version }} | ||
- name: yarn install, build and lint | ||
run: | | ||
yarn install --frozen-lockfile | ||
yarn build | ||
yarn lint |
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 |
---|---|---|
|
@@ -4,7 +4,6 @@ dist | |
build | ||
.env | ||
|
||
|
||
# Remove some common IDE working directories | ||
.idea | ||
.vscode |
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
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.
Hi @wa0x6e It won't work without Redis? Redis is usually expensive, retry can't be in memory or on mysql DB?
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.
Most of the light queue libraries uses Redis as backend, it's built for that.
Redis is not used to store the retry, but is used as storage solution for the whole queue system.
As for the redis instance, only a small instance will be required, as data will be cleared as queue is cleared, only data for failed/waiting for retry jobs will be stored.
Another repo (envelop) is also using the queue system, we could share the same redis instance for all repo using a queue system
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.
For that we need @bonustrack 's approval 😢 because he denied Redis a few times as far as I remember
@bonustrack what you think? we could use Redis here?
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.
I see, I've seen
REDIS_URL
in a few places, so I just assumed that it was common.