diff --git a/api/tools/reprocess_all_tracks.js b/api/tools/reprocess_all_tracks.js new file mode 100644 index 0000000..b26af52 --- /dev/null +++ b/api/tools/reprocess_all_tracks.js @@ -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); + });