Skip to content

Commit

Permalink
Merge pull request #4085 from airqo-platform/correct-logger-preferences
Browse files Browse the repository at this point in the history
just updating the logging logic for missing preferences
  • Loading branch information
Baalmart authored Dec 14, 2024
2 parents 35ac06e + 7ed3e36 commit a9e0110
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions src/auth-service/bin/jobs/preferences-log-job.js
Original file line number Diff line number Diff line change
Expand Up @@ -77,12 +77,16 @@ const logUserPreferences = async () => {
100
).toFixed(2);

logger.info(
`💔💔 Total count of users without Customised Locations in the default group: ${totalCountWithoutSelectedSites}, which is ${percentageWithoutSelectedSites}% of processed users.`
);
if (totalCountWithoutSelectedSites > 0) {
logger.info(
`💔💔 Total count of users without Customised Locations in the default group: ${totalCountWithoutSelectedSites}, which is ${percentageWithoutSelectedSites}% of processed users.`
);
} else {
logger.info(`😎🎉✅ All users have Customised Locations.`);
}
} else {
logger.info(
`😎🎉✅ No users processed or all users have Customised Locations.`
`🤔🤔 No users processed or no users belong to the default group.`
);
}
} catch (error) {
Expand Down

0 comments on commit a9e0110

Please sign in to comment.