mirror of
https://github.com/Portabase/portabase.git
synced 2026-07-14 11:16:13 +02:00
Working on the retention system.
This commit is contained in:
@@ -2,6 +2,8 @@ import {env} from "@/env.mjs";
|
||||
import {db, makeMigration} from "@/db";
|
||||
import {eq} from "drizzle-orm";
|
||||
import * as drizzleDb from "@/db";
|
||||
import cron from "node-cron";
|
||||
import {retentionJob} from "@/lib/tasks";
|
||||
|
||||
|
||||
export async function init() {
|
||||
@@ -11,8 +13,16 @@ export async function init() {
|
||||
await createDefaultOrganization();
|
||||
await createSettingsIfNotExist()
|
||||
console.log("====Initialization completed====");
|
||||
await setupCronJobs()
|
||||
}
|
||||
|
||||
async function setupCronJobs() {
|
||||
console.log("==== Setting up Cron Jobs ====");
|
||||
retentionJob.start();
|
||||
console.log(`==== Cron job started ====`);
|
||||
}
|
||||
|
||||
|
||||
async function createSettingsIfNotExist() {
|
||||
const configSettings = {
|
||||
name: "system",
|
||||
|
||||
Reference in New Issue
Block a user