Add Olist sync monitor

This commit is contained in:
Cauê Faleiros
2026-08-10 13:49:35 -03:00
parent 4bba1bb21c
commit e90610d066
5 changed files with 217 additions and 3 deletions

View File

@@ -1,10 +1,11 @@
const { createApp } = require('./server');
const { initDB } = require('./db');
const { OLIST_SYNC_ENABLED, PORT } = require('./config');
const { scheduleOlistSync } = require('./services/olistService');
const { markInterruptedOlistRuns, scheduleOlistSync } = require('./services/olistService');
const start = async () => {
await initDB();
await markInterruptedOlistRuns();
const app = createApp();
if (OLIST_SYNC_ENABLED) scheduleOlistSync();