Skip to content

Commit

Permalink
create ES index after every other sync are done
Browse files Browse the repository at this point in the history
  • Loading branch information
ashaban committed Oct 5, 2020
1 parent 531b9df commit 77e7a98
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions server/lib/dataSync.js
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ function syncWorkflows (callback) {
.format('Y-MM-DDTHH:mm:ss');
mixin.updateConfigFile(['lastSync', 'syncWorkflows', 'time'], runsLastSync, () => {});
}
cacheFHIR2ES(() => {});
return callback(processingError);
});
}
Expand Down Expand Up @@ -111,6 +112,7 @@ function syncContacts(callback) {
if (err) {
processingError = err;
}
cacheFHIR2ES(() => {});
logger.info('Contacts Sync Done');
return callback(processingError);
});
Expand Down Expand Up @@ -151,6 +153,7 @@ function syncContactsGroups(callback) {
.format('Y-MM-DDTHH:mm:ss');
mixin.updateConfigFile(['lastSync', 'syncContactsGroups', 'time'], runsLastSync, () => {});
}
cacheFHIR2ES(() => {});
return callback(processingError);
});
}
Expand Down Expand Up @@ -178,6 +181,7 @@ function syncWorkflowRunMessages(callback) {
.format('Y-MM-DDTHH:mm:ss');
mixin.updateConfigFile(['lastSync', 'syncWorkflowRunMessages', 'time'], runsLastSync, () => {});
}
cacheFHIR2ES(() => {});
return callback(processingError);
});
}
Expand All @@ -191,6 +195,7 @@ function syncFloipFlowResults(callback) {
.format('Y-MM-DD HH:mm:ss');
mixin.updateConfigFile(['lastSync', 'syncFloipFlowResults', 'time'], runsLastSync, () => {});
}
cacheFHIR2ES(() => {});
return callback(err);
});
}
Expand All @@ -210,6 +215,7 @@ function checkCommunicationRequest(callback) {
processingError = true;
}
logger.info('Done checking communication requests');
cacheFHIR2ES(() => {});
return callback(processingError);
});
});
Expand Down

0 comments on commit 77e7a98

Please sign in to comment.