mirror of
https://github.com/OneUptime/oneuptime
synced 2024-11-21 22:59:07 +00:00
Merge branch 'master' into workflow-refactor
This commit is contained in:
commit
a35d26bc6a
@ -4,6 +4,10 @@ import InfrastructureStatus from "Common/Server/Infrastructure/Status";
|
||||
import logger from "Common/Server/Utils/Logger";
|
||||
import App from "Common/Server/Utils/StartServer";
|
||||
import Telemetry from "Common/Server/Utils/Telemetry";
|
||||
import Realtime from "Common/Server/Utils/Realtime";
|
||||
import PostgresAppInstance from "Common/Server/Infrastructure/PostgresDatabase";
|
||||
import Redis from "Common/Server/Infrastructure/Redis";
|
||||
import { ClickhouseAppInstance } from "Common/Server/Infrastructure/ClickhouseDatabase";
|
||||
import "ejs";
|
||||
|
||||
const APP_NAME: string = "worker";
|
||||
@ -33,6 +37,20 @@ const init: PromiseVoidFunction = async (): Promise<void> => {
|
||||
},
|
||||
});
|
||||
|
||||
// Connect to Postgres database
|
||||
await PostgresAppInstance.connect();
|
||||
|
||||
// Connect to Redis
|
||||
await Redis.connect();
|
||||
|
||||
// Connect to Clickhouse database
|
||||
await ClickhouseAppInstance.connect(
|
||||
ClickhouseAppInstance.getDatasourceOptions(),
|
||||
);
|
||||
|
||||
// Initialize real-time functionalities
|
||||
await Realtime.init();
|
||||
|
||||
// Initialize home routes at the end since it has a catch-all route
|
||||
await WorkerRoutes.init();
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user