-
Notifications
You must be signed in to change notification settings - Fork 0
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: polling loop using generator, manging job flow with jobHandler (MAPCO-4439) #2
Conversation
src/services/jobProcessor.ts
Outdated
}; | ||
} | ||
|
||
public async consumeAndProcess(): Promise<void> { |
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.
is this function is called each interval? how?
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.
Good job! nice tests. consider add ingestion test with nock:
exmaple:
https://github.com/MapColonies/ingestion-trigger/blob/52f2212151c231f3fe48ad2c98e2b3e0067aea70/tests/integration/ingestion/ingestion.spec.ts#L565
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.
few comments but great work.
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.
Good job!
tests coverage will be fix in the next pull request when job-handlers will be implemented
Further information:
Added polling loop using generator to dequeue init task with one of the job_types we support ["Ingestion_New", "Ingestion_Update", "Ingestion_Swap_Update"].
And get the relevant job and decide what's the job flow by his type.