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) }