agent starting :D

This commit is contained in:
2026-03-01 14:10:19 -06:00
parent c3379919b9
commit 68d13b03d3
34 changed files with 1905 additions and 254 deletions

View File

@@ -0,0 +1,16 @@
/**
* When a feature setting gets updated we will handle it here.
* we will stop jobs, stop cycles
*/
import type { Setting } from "../db/schema/settings.schema.js";
import { resumeCronJob, stopCronJob } from "../utils/croner.utils.js";
export const featureControl = async (data: Setting) => {
// when a feature is changed to active or deactivated we will update the cron.
if (data.active) {
resumeCronJob(data.name);
} else {
stopCronJob(data.name);
}
};