dsql-admin/dsql-app/docker/cron/index.ts

29 lines
644 B
TypeScript
Raw Normal View History

2025-02-16 16:12:40 +00:00
import mysql from "serverless-mysql";
global.DSQL_DB_CONN = mysql({
config: {
host: process.env.DSQL_DB_HOST,
user: process.env.DSQL_DB_USERNAME,
password: process.env.DSQL_DB_PASSWORD,
database: process.env.DSQL_DB_NAME,
charset: "utf8mb4",
},
});
global.DSQL_USE_LOCAL = true;
import watchMainDbSchemaJSONFile from "./(functions)/watch-main-db-schema-json-file";
import cronHandleQueue from "./(functions)/queue/handle-queue";
console.log("Running Cron Services ....");
/**
* # Watch Main JSON DB Schema File
*/
watchMainDbSchemaJSONFile();
/**
* # Handle Queue
*/
cronHandleQueue();