-
Notifications
You must be signed in to change notification settings - Fork 9
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: initial implementation endpoint based workers #7
Merged
Merged
Changes from all commits
Commits
Show all changes
12 commits
Select commit
Hold shift + click to select a range
1e5be48
feat: initial implementation endpoint based workers
manast 09917f2
chore: inserted message-broker instead of a dependency
manast 9b129e9
chore: remove broken ci step
manast 7cca237
chore: refactor environment variables into config.ts
manast 10e0fd1
ci: add dragonflydb support to the tests
manast ca89f4d
ci: start redis instance before running the tests
manast 865ec24
test: set maxRetriesPerRequest: null
manast 2fc15c1
chore: move all imports to single line
manast b7b786c
test: add worker before removing it
manast 211dbe9
test(worker-http-controller): correct broken test
manast 809abd7
perf(validators): outrefactor constants to make them globals
manast bf0c404
docs: make clearer the sentence about untrusted sources
manast 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 |
---|---|---|
|
@@ -14,15 +14,45 @@ permissions: | |
contents: read # to fetch code (actions/checkout) | ||
|
||
jobs: | ||
test: | ||
test-redis: | ||
runs-on: ubuntu-latest | ||
|
||
name: Testing with Bun | ||
name: Testing with Bun, redis@${{ matrix.redis-version }} | ||
|
||
strategy: | ||
matrix: | ||
redis-version: [7-alpine, 6-alpine] | ||
|
||
steps: | ||
- name: Checkout repository | ||
uses: actions/checkout@v3 # v3 | ||
- uses: oven-sh/setup-bun@v1 | ||
- name: Start Redis | ||
uses: supercharge/[email protected] | ||
with: | ||
redis-version: ${{ matrix.redis-version }} | ||
- run: bun install | ||
- run: cd node_modules/@taskforcesh/message-broker && bun run postinstall | ||
- run: bun run tsc | ||
- run: bun test | ||
|
||
test-dragonflydb: | ||
runs-on: ubuntu-latest | ||
|
||
name: Testing with Bun, dragonflydb@latest | ||
|
||
services: | ||
dragonflydb: | ||
image: docker.dragonflydb.io/dragonflydb/dragonfly | ||
env: | ||
DFLY_cluster_mode: emulated | ||
DFLY_lock_on_hashtags: true | ||
ports: | ||
- 6379:6379 | ||
|
||
steps: | ||
- name: Checkout repository | ||
uses: actions/checkout@v3 # v3 | ||
- uses: oven-sh/setup-bun@v1 | ||
- run: bun install | ||
- run: bun run tsc | ||
- run: QUEUE_PREFIX={b} bun test |
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
Binary file not shown.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
/** | ||
* ASCII Art generated with https://www.asciiart.eu/image-to-ascii | ||
* from an image generated by ChatGPT v4: | ||
* "Art depiction of a full-body bull facing the viewer with a menacing look. | ||
* This image showcases the bull's large horns, muscular body, and aggressive posture, | ||
* embodying power and strength." | ||
*/ | ||
const asciiArt = ` | ||
; | ||
;: ;: | ||
:; :;++;. ::. ;: | ||
.:;. :X&X$&$$$;$&&&X+: .;: | ||
::$XxX$$&&&&&&&;+X$$&$++XX$XX++$$x+;:: :x.: | ||
:::+XXXx+x+++++:XXXX$$+;X$X$++:XXXX$$&&&&&&&&X:;. | ||
:;:::::;;:. +++$$X$X;xXXXX::..:...::;+++;::; | ||
;+::. ;.:XX+XxXX;X$$Xx;.:.:;X: ... | ||
x:::. :.++:X$XxxX$$xx :; | ||
+$Xx: .XX+.:++$$$x;;:; .+X&: | ||
X$x;:::+;+;.+X$$$X;:::.::+X&$. | ||
xX+;+::+;x++++X$$x:;:;.;.:+X+XX; | ||
xx:+:;.;;.++++$$$x;;;.:.;:.xx;++$$x::;;;. | ||
x+;;;:::;+;X$xXXXXX: :::.::+$x .:+$&&&&&&&; | ||
+$;;;;:::. +x:+++++;X .:::.+:+x$+&&X$;XX;++$&&; | ||
+$X+::;::::.;+:: ::X ::. :.;$&x+$$X&$$&&; +$x++ | ||
;&$$X::;:; ::::.::: .:: ::;X$&$X+$:+&Xx$$+ :.;X: | ||
X$X$$+:.::: . ::...++XX$Xx;X:X&$++x::XX;+++ | ||
.X$;x+;::.+:. : . .::;x+x:XXx:::X$$+++ :+X$;+x+ | ||
+Xx:X; :::::: :. : :: +;+X+;.+++. x+$X+++.X$+;:;xX: | ||
;:;: ::.:. : :. . :::;+++:. ::. :;:+;;+:.X&$x;.;x; | ||
:..:.::. : ... ...:;;::. :; ::.:.;+:..+XX;:::;: | ||
:;.:::.:. .. .. .:::;. .;x$Xx ..::.. :;:.;+x:. | ||
$&;. .:. :: :: .. :. ;x$x:$; .::. . ::+;:: | ||
:&x++. .:. ;: ::: ::+$X:.x; .:: ... ..:. ::+ | ||
$;+X;..: . . +: .. .+x;Xx:;.:. . . ..: .:: :+ | ||
;+:++; .:. :. ;. .;:.::X;.; .... . .:;; :x | ||
:;:.. . ::: ..;.;: ;.. .: : . .:::XX. :x: | ||
:::.:. .::. .:+::.::;. :: : ;. .:::: :+ | ||
.;;:... ::::... :+Xx. ::.;;: . + ::.. ... +x; | ||
+$X; :+$$X:. :::. :++ .:: ++X++ | ||
;+::.;. :+. ;++: ::. :+: :: .:: :x;.;;. | ||
;:... :::.:; .x:.: : .:.::;+;:+ | ||
;..: ::.. X;.. :.; ::;;;;; | ||
:X;:. :x+:. +x:: ::; ;;:+: | ||
.$$x:: .$$X:: +X:: :::; ;;;;. | ||
.;;;::.. +;;;:: x+;:: :::::: .;:; | ||
.X:Xx;.. X+.x+;: +;+;: .+:;+; ..: | ||
.X;XX;::: X+:xX+:. x;;+:. X;:x;:: | ||
.:;+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++:.. | ||
..:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::` | ||
|
||
export default asciiArt; |
Oops, something went wrong.
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.
any reasons to use chalk? faster options are available.
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.
Chalk is well maintained so thats a plus. Usually I pick "pino" though, as a fast and versatile alternative to console.log, maybe it is the best alternative here as well... 🤔
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.
+1 on pino, it is awesome. it doesn't work in browsers, but from my understanding you only need it on the server
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.
We can change it in a separate PR as it will not imply a breaking change.