Skip to content
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

Merged

Conversation

angelhigueraacid
Copy link
Contributor

Ensure import flow is connected together

This PR includes the following features and refactors:

  • Added import api events for scenarios and projects
  • Added SchedulePieceImportHandler and PieceImportRequestedSaga. When PieceImportRequested event is emitted PieceImportRequestedSaga sends a SchedulePieceImport command , then SchedulePieceImportHandler adds a import-piece job to queue.
  • Renamed CompletePiece to CompleteExportPiece. Now we can have CompleteExportPiece and CompleteImportPiece events.
  • Fixed some javascript import/export issues regarding ResourceId and ExportId.
  • Added MarkImportAsSubmittedHandler and ImportRequestedSaga. When ImportRequested event is emitted ImportRequestedSaga sends a MarkImportAsSubmitted command, then MarkImportAsSubmittedHandler creates an import submitted api event.
  • Added MarkImportAsFinishedHandler and AllPiecesImportedSaga. When AllPiecesImported event is emitted AllPiecesImportedSaga sends a MarkImportAsFinished command, then MarkImportAsFinishedHandler creates an import finished api event.

Feature relevant tickets

Ensure import flow is connected together

@angelhigueraacid angelhigueraacid added the API Everything related the api label Feb 15, 2022
@angelhigueraacid angelhigueraacid self-assigned this Feb 15, 2022
@vercel
Copy link

vercel bot commented Feb 15, 2022

This pull request is being automatically deployed with Vercel (learn more).
To see the status of your deployments, click below or on the icon next to each commit.

marxan – ./app

🔍 Inspect: https://vercel.com/vizzuality1/marxan/FkbJmtGHER2iAkZwbd8GCjH9LZmr
✅ Preview: https://marxan-git-feat-marxan-875-ensure-import-flo-7766bf-vizzuality1.vercel.app

marxan-storybook – ./app

🔍 Inspect: https://vercel.com/vizzuality1/marxan-storybook/E2Rp6VNqoSA2t4H8Zewnnig7yAsM
✅ Preview: https://marxan-storybook-git-feat-marxan-875-ensure-299b01-vizzuality1.vercel.app

import { SchedulePieceImport } from './schedule-piece-import.command';
import { SchedulePieceImportHandler } from './schedule-piece-import.handler';

function getDifferentComponentId(previous: ComponentId): ComponentId {
Copy link
Contributor

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
API Everything related the api
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants