Update create.js

This commit is contained in:
Aleksandr Statciuk 2022-02-27 17:43:08 +03:00
parent 6a89e53a1d
commit 0de4ee66d1

View file

@ -37,6 +37,7 @@ async function createQueue() {
const utcDate = date.getUTC() const utcDate = date.getUTC()
const dates = Array.from({ length: options.days }, (_, i) => utcDate.add(i, 'd')) const dates = Array.from({ length: options.days }, (_, i) => utcDate.add(i, 'd'))
for (const filepath of files) { for (const filepath of files) {
try {
const dir = file.dirname(filepath) const dir = file.dirname(filepath)
const { site, channels: items } = await parser.parseChannels(filepath) const { site, channels: items } = await parser.parseChannels(filepath)
if (!site) continue if (!site) continue
@ -85,6 +86,9 @@ async function createQueue() {
} }
} }
} }
} catch (err) {
console.error(err)
}
} }
queue = Object.values(queue) queue = Object.values(queue)