From 5811ab46ba52b7d4ce6af1255479b0ed5471f7de Mon Sep 17 00:00:00 2001 From: ale Date: Mon, 14 Oct 2024 21:29:58 +0200 Subject: [PATCH] taskdeletedup --- lib/taskdeletedup.js | 2 +- server.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/taskdeletedup.js b/lib/taskdeletedup.js index dd0853f..6f3cf92 100644 --- a/lib/taskdeletedup.js +++ b/lib/taskdeletedup.js @@ -28,7 +28,7 @@ module.exports = client => { }) for (const instance of result.hits.hits) { if (last && instance._source && last.instance === instance._source.instance) { - await client.delete({ index: index, id: instance._id }) + await client.delete({ index: constant.index, id: instance._id }) count.deleted++ console.log('deleted ' + instance._id + ': ' + instance._source.instance) } diff --git a/server.js b/server.js index fc8bba0..8dda640 100644 --- a/server.js +++ b/server.js @@ -109,8 +109,8 @@ const apexinstance = require('./lib/apex'), } taskdeletedup(client) await apex.startDelivery() - await fediblock(client, apex, app) console.log('Server listening on ' + server.address().address + ':' + server.address().port) + await fediblock(client, apex, app) } catch (e) { console.error(e) }