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

fix: trigger bug fixes #36

Merged
merged 5 commits into from
Nov 15, 2022
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 8 additions & 6 deletions src/createPackage/models/createPackageManager.ts
Original file line number Diff line number Diff line change
Expand Up @@ -77,8 +77,15 @@ export class CreatePackageManager {

const callbacks = callbackURLs.map((url) => ({ url, bbox }));
const duplicationExist = await this.checkForDuplicate(dupParams, callbacks);
if (!duplicationExist) {
if (duplicationExist && duplicationExist.status === OperationStatus.COMPLETED) {
const completeResponseData = duplicationExist as ICallbackResponse;
completeResponseData.bbox = bbox;
return duplicationExist;
} else if (duplicationExist) {
return duplicationExist;
} else {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

you don't need the "else { " condition - remove it as it's obvious

const batches: ITileRange[] = [];

for (let i = 0; i <= zoomLevel; i++) {
batches.push(bboxToTileRange(sanitizedBbox, i));
}
Expand Down Expand Up @@ -125,12 +132,7 @@ export class CreatePackageManager {
};
const jobCreated = await this.jobManagerClient.create(workerInput);
return jobCreated;
} else if (duplicationExist.status === OperationStatus.COMPLETED) {
const completeResponseData = duplicationExist as ICallbackResponse;
completeResponseData.bbox = bbox;
}

return duplicationExist;
}

public async createJsonMetadata(filePath: string, dbId: string): Promise<void> {
Expand Down