Skip to content

Commit

Permalink
Update constants.ts (#1122)
Browse files Browse the repository at this point in the history
* Update constants.ts

* Update utilities/project-factory/src/server/config/constants.ts

Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>

* Update campaignUtils.ts

* Update campaignUtils.ts

* Update campaignMappingUtils.ts

---------

Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
  • Loading branch information
ashish-egov and coderabbitai[bot] authored Jul 23, 2024
1 parent f2cf0bf commit 418ca65
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 14 deletions.
22 changes: 11 additions & 11 deletions utilities/project-factory/src/server/config/constants.ts
Original file line number Diff line number Diff line change
Expand Up @@ -112,17 +112,17 @@ export const generatedResourceStatuses: any = {

export const processTrackTypes = {
validation: "validation",
triggerResourceCreation: "triggerResourceCreation",
facilityCreation: "facilityCreation",
staffCreation: "staffCreation",
targetAndDeliveryRulesCreation: "targetAndDeliveryRulesCreation",
confirmingResouceCreation: "confirmingResouceCreation",
prepareResourceForMapping: "prepareResourceForMapping",
validateMappingResource: "validateMappingResource",
staffMapping: "staffMapping",
resourceMapping: "resourceMapping",
facilityMapping: "facilityMapping",
campaignCreation: "campaignCreation",
triggerResourceCreation: "trigger-resource-creation",
facilityCreation: "facility-creation",
staffCreation: "staff-creation",
targetAndDeliveryRulesCreation: "target-and-delivery-rules-creation",
confirmingResourceCreation: "confirming-resource-creation",
prepareResourceForMapping: "prepare-resource-for-mapping",
validateMappingResource: "validate-mapping-resource",
staffMapping: "staff-mapping",
resourceMapping: "resource-mapping",
facilityMapping: "facility-mapping",
campaignCreation: "campaign-creation",
error: "error"
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -294,7 +294,7 @@ async function processCampaignMapping(messageObject: any) {
logger.info("Campaign Already In Progress and Mapped");
}
else {
await persistTrack(id, processTrackTypes.confirmingResouceCreation, processTrackStatuses.inprogress);
await persistTrack(id, processTrackTypes.confirmingResourceCreation, processTrackStatuses.inprogress);
try {
var completedResources: any = []
var resources = [];
Expand Down Expand Up @@ -333,10 +333,10 @@ async function processCampaignMapping(messageObject: any) {
}
} catch (error: any) {
console.log(error)
await persistTrack(id, processTrackTypes.confirmingResouceCreation, processTrackStatuses.failed, { error: String((error?.message + (error?.description ? ` : ${error?.description}` : '')) || error) });
await persistTrack(id, processTrackTypes.confirmingResourceCreation, processTrackStatuses.failed, { error: String((error?.message + (error?.description ? ` : ${error?.description}` : '')) || error) });
throw new Error(error)
}
await persistTrack(id, processTrackTypes.confirmingResouceCreation, processTrackStatuses.completed);
await persistTrack(id, processTrackTypes.confirmingResourceCreation, processTrackStatuses.completed);
await fetchAndMap(resources, messageObject);
}
}
Expand Down

0 comments on commit 418ca65

Please sign in to comment.