Skip to content

Commit

Permalink
remove debug logging and add Model-ID to final log
Browse files Browse the repository at this point in the history
  • Loading branch information
aScharfe committed Dec 20, 2024
1 parent b862f86 commit 8d236bf
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions processinstance-delete.js
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down Expand Up @@ -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) => {
Expand Down

0 comments on commit 8d236bf

Please sign in to comment.