Skip to content

Commit

Permalink
Update campaignUtils.ts
Browse files Browse the repository at this point in the history
  • Loading branch information
ashish-egov authored Jun 27, 2024
1 parent bf26bcc commit 0508633
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions utilities/project-factory/src/server/utils/campaignUtils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -479,12 +479,12 @@ async function generateProcessedFileAndPersist(request: any, localizationMap?: {
}
produceModifiedMessages(persistMessage, config?.kafka?.KAFKA_UPDATE_RESOURCE_DETAILS_TOPIC);
logger.info(`ResourceDetails to persist : ${request.body.ResourceDetails.type}`);
if (request?.body?.Activities && Array.isArray(request?.body?.Activities && request?.body?.Activities.length > 0)) {
if (request?.body?.Activities && Array.isArray(request?.body?.Activities) && request?.body?.Activities.length > 0) {
logger.info("Activities to persist : ")
logger.debug(getFormattedStringForDebug(request?.body?.Activities));
logger.info(`Waiting for 2 seconds`);
await new Promise(resolve => setTimeout(resolve, 2000));
produceModifiedMessages(request?.body, config?.kafka?.KAFKA_CREATE_RESOURCE_ACTIVITY_TOPIC);
produceModifiedMessages(request?.body, config.kafka.KAFKA_CREATE_RESOURCE_ACTIVITY_TOPIC);
}
}

Expand Down

0 comments on commit 0508633

Please sign in to comment.