mirror of
https://github.com/orangecoding/fredy.git
synced 2026-06-16 12:31:07 +00:00
sending job key with the listings
This commit is contained in:
@@ -3,13 +3,14 @@
|
||||
* @param serviceName e.g immoscout
|
||||
* @param newListings an array with newly found listings
|
||||
* @param notificationConfig config of this notification adapter
|
||||
* @param jobKey name of the current job that is being executed
|
||||
*/
|
||||
exports.send = (serviceName, newListings, notificationConfig) => {
|
||||
exports.send = (serviceName, newListings, notificationConfig, jobKey) => {
|
||||
const { enabled } = notificationConfig.console;
|
||||
if (!enabled) {
|
||||
return [Promise.resolve()];
|
||||
}
|
||||
/* eslint-disable no-console */
|
||||
return [Promise.resolve(console.info(`Found entry from service ${serviceName}:`, newListings))];
|
||||
return [Promise.resolve(console.info(`Found entry from service ${serviceName}, Job: ${jobKey}:`, newListings))];
|
||||
/* eslint-enable no-console */
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user