-
Notifications
You must be signed in to change notification settings - Fork 0
Implementing workers - Part one #14
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
Open
rolandKoczan
wants to merge
50
commits into
master
Choose a base branch
from
Implementing-Workers
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from 20 commits
Commits
Show all changes
50 commits
Select commit
Hold shift + click to select a range
748d5b4
Added redis port and script
316b6f6
Redis env var
2a66243
Adder trigger endpoint
d768508
Modified models
9051a6f
Redis config, added workers and trigger script
2f4139c
Modified github service test cases
3155ece
User.login is unique
7133f24
Added parameter validation and default value
3fcc8b8
Repository worker wont fail if user already exists
e3b21d7
Default value, rmeoved Joi validation
9ff4e73
Default value fix
d7f642a
Minor modifications
ae3ea68
Added quit after message is sent
c296d48
Removing logs
7fa0908
trigger script correction
b6ffdb0
Modified graphql query
f03acb0
Redis channel names correction
853c0a3
Contribution handler
4973f83
Modified test query
cc85390
Refactored contribution handler
61929ad
Changed linter script command
20ab9ef
Refactored onRepository handler
a63271b
Added TRIGGER_QUERY
e6930db
Reafctored repository message listener
9fb7a99
Added value assertions
c52fc35
Added redis config env vars
96b4602
Swapped host and port
e962d38
Trigger no checks if channels are subscribed
c47b035
Added process exit on error
e9aed9f
new line
94d3f9c
Fixed versioning
ec8b871
removed ()
e38eed1
Removed comments
bc43a77
Contribution refactor
3db079c
Removed onTrigger, subscription happens here
f37e4bd
Added on subscribe listener, trigger client
abcf6f1
Removed error handling, client creation, publish
ec479db
Renamed variable
419a4a6
Added required to schemas
9973896
onContributon wait until all promises are resolved
192b02c
Created test file
0eeb78c
Added stub and fixed typo
a9cc659
Changed function import
219c5a5
Added test cases
84b5d57
Changed mock to be dynamic
313c9dc
Added repositoryCount to schema
83bda9e
Added repositoryCount to mock message
9287050
For each collaboratorsa message is sent
791836e
Removed stringifies from logger functions
7e65716
Changed subscribe event handler
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 hidden or 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 |
|---|---|---|
|
|
@@ -5,3 +5,4 @@ DBUSER= | |
| DBPASSWORD= | ||
| DB= | ||
| LOG_LEVEL= | ||
| REDIS_PORT= | ||
This file contains hidden or 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 hidden or 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 hidden or 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 hidden or 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
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains hidden or 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 hidden or 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 hidden or 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,13 @@ | ||
| const logger = require('../logger'); | ||
| const { initChannels } = require('../worker/index'); | ||
| const { onTrigger } = require('../worker/handlers/trigger'); | ||
|
|
||
| logger.info('Initiating trigger script'); | ||
|
|
||
| if (!process.env.TRIGGER_QUERY) throw Error('Missing TRIGGER_QUERY env variable!'); | ||
|
|
||
rolandKoczan marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| logger.info('Initiating channels'); | ||
| initChannels(); | ||
rolandKoczan marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
|
|
||
| logger.info('Sending trigger message'); | ||
| onTrigger(process.env.TRIGGER_QUERY); | ||
rolandKoczan marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
This file contains hidden or 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.
Uh oh!
There was an error while loading. Please reload this page.