Skip to content
This repository was archived by the owner on Sep 4, 2020. It is now read-only.

Commit d18560f

Browse files
feat(#3): add a bit of loggin
1 parent 25d1a5f commit d18560f

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

cronjobs/push-new-candidates.js

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,13 +50,22 @@ function pushNewCandidates() {
5050
}
5151

5252
if (utils.isNotEmpty(promises)) {
53+
54+
logger.info("Gonna search candidates for " + promises.length + " items.");
55+
5356
Promise.all(promises).then((values) => {
5457
if (utils.isNotEmpty(values)) {
58+
59+
let loggerCount = 0;
60+
5561
for (let i = 0, len = values.length; i < len; i++) {
5662
if (values[i].hasCandidates) {
5763
pushCandidatesHelper.sendPushNotification(values[i], 'ITEMS.NEW_CANDIDATES');
64+
loggerCount++;
5865
}
5966
}
67+
68+
logger.info("For " + loggerCount + " items we found potential candidates.");
6069
}
6170
})
6271
.catch((err) => {

0 commit comments

Comments
 (0)