Skip to content
Merged
Changes from all commits
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
Original file line number Diff line number Diff line change
Expand Up @@ -61,19 +61,19 @@ public Object call() throws Exception {

//Convert payload to obj
WebhooksEvent event = service.getWebhooksEvent(payload);
EventNotification eventNotification = event.getEventNotifications().get(0);
for (EventNotification eventNotification : event.getEventNotifications()) {

// get the company config
CompanyConfig companyConfig = companyConfigService.getCompanyConfigByRealmId(eventNotification.getRealmId());
// get the company config
CompanyConfig companyConfig = companyConfigService.getCompanyConfigByRealmId(eventNotification.getRealmId());

// perform cdc with last updated timestamp and subscribed entities
String cdcTimestamp = DateUtils.getStringFromDateTime(DateUtils.getCurrentDateTime());
cdcService.callDataService(companyConfig);

// update cdcTimestamp in companyconfig
companyConfig.setLastCdcTimestamp(cdcTimestamp);
companyConfigService.save(companyConfig);
// perform cdc with last updated timestamp and subscribed entities
String cdcTimestamp = DateUtils.getStringFromDateTime(DateUtils.getCurrentDateTime());
cdcService.callDataService(companyConfig);

// update cdcTimestamp in companyconfig
companyConfig.setLastCdcTimestamp(cdcTimestamp);
companyConfigService.save(companyConfig);
}
}

return null;
Expand Down