From 8d236bf86abb2617888bf326c047727207e7e412 Mon Sep 17 00:00:00 2001 From: aScharfe Date: Fri, 20 Dec 2024 12:34:52 +0100 Subject: [PATCH] remove debug logging and add Model-ID to final log --- processinstance-delete.js | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/processinstance-delete.js b/processinstance-delete.js index e4da5ce..81d0054 100644 --- a/processinstance-delete.js +++ b/processinstance-delete.js @@ -32,10 +32,9 @@ module.exports = function (RED) { // Zeitmultiplikator berechnen const multiplier = timeType === 'hours' ? 1 : 24; - node.log(`Time type: ${timeType}, multiplier: ${multiplier}`); + node.log(`Time type: ${timeType}`); - const deletionDate = new Date(Date.now() - timeToUse * multiplier * 60 * 60 * 1000); - node.log(`Calculated deletion date: ${deletionDate}`); + const deletionDate = new Date(Date.now() - timeToUse * multiplier * 60 * 60 * 1000); const modelId = msg.payload.processModelId?.trim() || config.modelid?.trim(); if (!modelId) { @@ -79,7 +78,7 @@ module.exports = function (RED) { try { await client.processInstances.deleteProcessInstances(ids, true); msg.payload.successfulDeletions.push(...ids); - node.log(`Successfully deleted ${ids.length} process instances.`); + node.log(`Successfully deleted ${ids.length} process instances for Model-ID: ${modelId}.`); } catch (deleteError) { var message = JSON.stringify(deleteError); ids.forEach((id) => {