-
Notifications
You must be signed in to change notification settings - Fork 1
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
[TM-1531] add job connection #745
Open
egrojMonroy
wants to merge
25
commits into
staging
Choose a base branch
from
feat/TM-1531-add-job-connection
base: staging
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 5 commits
Commits
Show all changes
25 commits
Select commit
Hold shift + click to select a range
aa5b7e6
[TM-1531] add job service url and script
egrojMonroy 153050a
[TM-1531] apiSlice add job resource
egrojMonroy fa4d2c4
[TM-1531] updates for job service
egrojMonroy 9fbece2
[TM-1531] sort alphabetical
egrojMonroy 8303877
[TM-1531] add connection for list the delayed jobs
egrojMonroy 06783b3
[TM-1531] remove unnecesary code and consistency in selector and API …
egrojMonroy 4972958
[TM-1531] Merge branch 'staging' into feat/TM-1531-add-job-connection
egrojMonroy e8cef37
[TM-1531] add bulk update call on clear
egrojMonroy ded0b85
[TM-1531] add entityname and display data in notification
egrojMonroy c8d7c71
[TM-1531] use store and display only not acknowledged
egrojMonroy 07e2d56
[TM-1531] remove from apifetcher call and add continous call for dela…
egrojMonroy 9d45753
[TM-1531] Merge branch 'staging' into feat/TM-1531-add-job-service
egrojMonroy 05fdae6
[TM-1531] Merge branch 'feat/TM-1531-add-job-service' into feat/TM-15…
egrojMonroy 4637c98
[TM-1531] rollback apifetcher functionality
egrojMonroy e58c0a1
[TM-1531] adding message to notification
egrojMonroy 996d5a7
[TM-1531] display error messages in notifications
egrojMonroy b6e0102
[TM-1531] add error messages for failed jobs
egrojMonroy fc1a52a
[TM-1531] improve connection and remove awaits and asyncs
egrojMonroy 69d08d7
[TM-1531] changes and remove log
egrojMonroy d5ba353
[TM-1531] Merge branch 'release/utltimate-ulmus' into feat/TM-1531-ad…
egrojMonroy 042ecbc
[TM-1531] yarn generate:services
egrojMonroy 06a7958
[TM-1531] divide names loading for connections
egrojMonroy 6cad9a9
[TM-1531] running with build
egrojMonroy af9b8da
[TM-1531] only send not pending
egrojMonroy 1b73259
[TM-1531] fix loaded delayedjobs and filter
egrojMonroy 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
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
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 seems like it should be throwing an error in the TS compiler... Maybe I'm missing something, but this shape does not seem to match
DelayedJobsConnection
.A couple of thoughts here:
isLoading
,hasLoadFailed
andresponse
, while seeming convenient when looking at a single connection, are actually a disaster down the road. The reason being that if we follow such generic conventions for individual connections, then when a component ends up using 2 or more connections, it gets really awkward to juggle all theisLoading
s that each connection returns. Instead, I think it's better to be super specific with the properties of the connection shape. So something more likebulkUpdateJobsIsLoading
andbulkUpdateJobsHasFailed
.As for
response
- this appears to be just returning all the delayed jobs like the other connection does. Are these used in the same component? Perhaps a better approach would be to combine them into a single connection. I think of connections as being responsible for providing a given set of data from the redux cache, and a set of functions for operating on that data. It would be totally reasonable for thisbulkUpdateJobs
call to be triggered from a function that's included on the other connection. Or, the bulkUpdate function could be simply exposed by this file, and then we simply rely on the original connection to provide thedelayedJobs
from the store. One of the primary wins of this system is that a connection returns data that got cached in the store regardless of where it came from. So if one call does the initial fetch, and another call modifies that data, as long as the data ends up back in the store under the same ID, the component that relies on it will rerender when it gets updated.