feat: add autonomous paper-trading and calibration pipeline
This commit is contained in:
@@ -6,6 +6,7 @@ const sourcesRoutes = require('./src/routes/sources');
|
||||
const eventRoutes = require('./src/routes/events');
|
||||
const adminRoutes = require('./src/routes/admin');
|
||||
const devRoutes = require('./src/routes/dev');
|
||||
const autonomyRoutes = require('./src/routes/autonomy');
|
||||
const config = require('./src/config');
|
||||
const { startScheduler } = require('./src/scheduler');
|
||||
|
||||
@@ -18,13 +19,18 @@ app.register(sourcesRoutes);
|
||||
app.register(eventRoutes);
|
||||
app.register(adminRoutes);
|
||||
app.register(devRoutes);
|
||||
app.register(autonomyRoutes);
|
||||
|
||||
app.get('/', async () => ({ ok: true }));
|
||||
|
||||
async function start() {
|
||||
await app.listen({ port: config.server.port, host: config.server.host });
|
||||
|
||||
startScheduler();
|
||||
if (process.env.DURIIN_RUN_SCHEDULER !== 'false') {
|
||||
startScheduler();
|
||||
} else {
|
||||
app.log.warn('Background ingestion and enrichment scheduler is disabled');
|
||||
}
|
||||
}
|
||||
|
||||
start().catch((error) => {
|
||||
|
||||
Reference in New Issue
Block a user