diff --git a/scripts/run-sync.js b/scripts/run-sync.js new file mode 100644 index 0000000..254d1f7 --- /dev/null +++ b/scripts/run-sync.js @@ -0,0 +1,3 @@ +import sync from "./sync-rss.js"; + +await sync.scheduled(); diff --git a/scripts/sync-rss.js b/scripts/sync-rss.js index 38311fb..7479bea 100644 --- a/scripts/sync-rss.js +++ b/scripts/sync-rss.js @@ -38,9 +38,7 @@ export default { ) VALUES ($id, $date, $content, $isCollision) ON CONFLICT DO NOTHING`, ).run({ $id: alert.uuid, - $date: new Date( - alert.active_period[0].start * 1000, - ).toISOString(), + $date: new Date().toISOString(), $content: content, $isCollision: result !== null, });