api: Add script to queue all tracks for reprocessing, useful after algorithm changes

This commit is contained in:
Paul Bienkowski 2021-10-31 21:35:33 +01:00
parent 67b6341f68
commit 07ec5b40a0

View file

@ -0,0 +1,19 @@
require('../src/db');
const { Track } = require('../src/models');
async function main() {
for (const track of await Track.find()) {
console.log('queuing', track.slug);
await track.queueProcessing();
}
}
main()
.then(() => {
process.exit(1);
})
.catch((e) => {
console.error(e);
process.exit(1);
});