-
Notifications
You must be signed in to change notification settings - Fork 5
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/marxan 875 ensure import flow is connected #830
Feat/marxan 875 ensure import flow is connected #830
Conversation
This pull request is being automatically deployed with Vercel (learn more). marxan – ./app🔍 Inspect: https://vercel.com/vizzuality1/marxan/FkbJmtGHER2iAkZwbd8GCjH9LZmr marxan-storybook – ./app🔍 Inspect: https://vercel.com/vizzuality1/marxan-storybook/E2Rp6VNqoSA2t4H8Zewnnig7yAsM |
34bf01b
to
502704e
Compare
api/apps/api/src/modules/clone/import/application/import-piece-failed.event.ts
Show resolved
Hide resolved
api/apps/api/src/modules/clone/import/domain/events/all-pieces-imported.event.ts
Outdated
Show resolved
Hide resolved
api/apps/api/src/modules/clone/infra/import/import-requested-saga.ts
Outdated
Show resolved
Hide resolved
api/apps/api/src/modules/clone/infra/import/mark-import-as-finished.command.ts
Outdated
Show resolved
Hide resolved
api/apps/api/src/modules/clone/infra/import/mark-import-as-submitted.command.ts
Outdated
Show resolved
Hide resolved
api/apps/api/src/modules/clone/infra/import/piece-import-requested.saga.ts
Outdated
Show resolved
Hide resolved
api/apps/api/src/modules/clone/infra/import/schedule-piece-import.command.ts
Show resolved
Hide resolved
5e3edb2
to
67f81fd
Compare
import { SchedulePieceImport } from './schedule-piece-import.command'; | ||
import { SchedulePieceImportHandler } from './schedule-piece-import.handler'; | ||
|
||
function getDifferentComponentId(previous: ComponentId): ComponentId { |
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 is not really needed (it is possible tho)
A collision is possible but the total number of unique keys generated is so large that the possibility of a collision is almost zero. As per Wikipedia, the number of UUIDs generated to have atleast 1 collision is 2.71 quintillion. This is equivalent to generating around 1 billion UUIDs per second for about 85 years.
Ensure import flow is connected together
This PR includes the following features and refactors:
SchedulePieceImportHandler
andPieceImportRequestedSaga
. WhenPieceImportRequested
event is emittedPieceImportRequestedSaga
sends aSchedulePieceImport
command , thenSchedulePieceImportHandler
adds aimport-piece
job to queue.CompletePiece
toCompleteExportPiece
. Now we can haveCompleteExportPiece
andCompleteImportPiece
events.ResourceId
andExportId
.MarkImportAsSubmittedHandler
andImportRequestedSaga
. WhenImportRequested
event is emittedImportRequestedSaga
sends aMarkImportAsSubmitted
command, thenMarkImportAsSubmittedHandler
creates an import submitted api event.MarkImportAsFinishedHandler
andAllPiecesImportedSaga
. WhenAllPiecesImported
event is emittedAllPiecesImportedSaga
sends aMarkImportAsFinished
command, thenMarkImportAsFinishedHandler
creates an import finished api event.Feature relevant tickets
Ensure import flow is connected together