-
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
Split abstract job processor #451
Merged
Merged
Conversation
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
CarlosGamero
reviewed
Feb 7, 2025
packages/app/background-jobs-common/src/background-job-processor/managers/QueueManager.ts
Outdated
Show resolved
Hide resolved
CarlosGamero
reviewed
Feb 7, 2025
packages/app/background-jobs-common/src/background-job-processor/managers/QueueManager.ts
Outdated
Show resolved
Hide resolved
CarlosGamero
reviewed
Feb 7, 2025
packages/app/background-jobs-common/src/background-job-processor/managers/JobRegistry.ts
Outdated
Show resolved
Hide resolved
CarlosGamero
reviewed
Feb 7, 2025
...jobs-common/src/background-job-processor/processors/AbstractUpdatedBackgroundJobProcessor.ts
Outdated
Show resolved
Hide resolved
kibertoad
reviewed
Feb 7, 2025
...jobs-common/src/background-job-processor/processors/AbstractUpdatedBackgroundJobProcessor.ts
Outdated
Show resolved
Hide resolved
* Adding default job schema * Creating types file * Using new types on manager classes * Lint fixes * js import fix * Test fix
kibertoad
reviewed
Feb 7, 2025
kibertoad
reviewed
Feb 7, 2025
Co-authored-by: Igor Savin <[email protected]>
kibertoad
reviewed
Feb 7, 2025
…r' into feat/split_abstract_job_processor
* Adding missing export * Adding support for JobPro options * Adding new types avoiding queue options on new processor * Adding queue options genetic * Fix test * Trying to improve types * Type fix * Minor fix * Lint fix * Introducing queue registry to simplify set up process * Type fix * Lint fixes * Fixing tests * Removing comment * Test fix * Improving tests * Improving coverage * lint fix * using expect error
* Queue is available with proper typing on processor * Lint fix * Adjusting tests * Minor fix * Minor type improvement * Removing worker auto run enabled * Removing lazy init from processor config * Job payload type safe with queue config * Lint fixes * Test fixes * More lint fixes * Minor change * Minor changes * Minor rename * Minor issue fix * Factory split * Type issue fix * Adding missing tests * Type simplification * Fixing queue manager spy type inference * Factory merge * Test fix * Type fix
dariacm
reviewed
Feb 10, 2025
packages/app/background-jobs-common/src/background-job-processor/processors/types.ts
Show resolved
Hide resolved
dariacm
approved these changes
Feb 10, 2025
* Adding some type tests * Processor basic type tests * Minor fix * test fix
CarlosGamero
approved these changes
Feb 10, 2025
kibertoad
approved these changes
Feb 10, 2025
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Changes
Previously the same class was responsible for scheduling and processing the job. This caused circular dependency situation in case job processor X depended on some method from the Service A to process a job, while same Service A was scheduling an instance of a job X from another method.
In this PR we are separating job scheduling and job processing logic, eliminating circular dependency risk.
(and while we are at it, improving type-safety via runtime validation)
Checklist
major
,minor
,patch
orskip-release