Updates
This commit is contained in:
+13
-1
@@ -1,5 +1,17 @@
|
||||
import { AppData } from "@/src/data/app-data";
|
||||
import cronCheckServices from "./functions/check-services";
|
||||
import { watchFile } from "fs";
|
||||
import path from "path";
|
||||
import { execSync } from "child_process";
|
||||
|
||||
if (process.env.NODE_ENV !== "production") {
|
||||
watchFile(path.resolve(__dirname, "../db/db-schema.js"), (curr, prev) => {
|
||||
execSync(`bunx nsqlite schema -t`, {
|
||||
cwd: path.resolve(__dirname, "../.."),
|
||||
stdio: "inherit",
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
while (true) {
|
||||
console.log(`Running Cron Services ...`);
|
||||
@@ -11,4 +23,4 @@ while (true) {
|
||||
await Bun.sleep(AppData["CronInterval"]);
|
||||
}
|
||||
|
||||
export {};
|
||||
// export {};
|
||||
|
||||
Reference in New Issue
Block a user