feat(ocme): new setting for determining the fifo check
This commit is contained in:
@@ -56,6 +56,12 @@ const newSettings = [
|
|||||||
description: "Dose the plant have 2 machines that go to 1?",
|
description: "Dose the plant have 2 machines that go to 1?",
|
||||||
moduleName: "ocp",
|
moduleName: "ocp",
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
name: "fifoCheck",
|
||||||
|
value: "45",
|
||||||
|
description: "How far back do we want to check for fifo default 45, putting 0 will ignore.",
|
||||||
|
moduleName: "ocme",
|
||||||
|
},
|
||||||
];
|
];
|
||||||
export const areSettingsIn = async () => {
|
export const areSettingsIn = async () => {
|
||||||
// get the roles
|
// get the roles
|
||||||
@@ -69,12 +75,12 @@ export const areSettingsIn = async () => {
|
|||||||
.values(newSettings)
|
.values(newSettings)
|
||||||
.onConflictDoNothing() // this will only update the ones that are new :D
|
.onConflictDoNothing() // this will only update the ones that are new :D
|
||||||
.returning({name: settings.name});
|
.returning({name: settings.name});
|
||||||
createLog("info", "lst", "server", "Roles were just added due to missing them on server startup");
|
createLog("info", "lst", "server", "Settingss were just added due to missing them on server startup");
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
createLog("error", "lst", "server", "There was an error adding new roles to the db");
|
createLog("error", "lst", "server", "There was an error adding new roles to the db");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
createLog("error", "lst", "server", "There was an error getting or adding new roles");
|
createLog("error", "lst", "server", "There was an error getting or adding new Settingss");
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|||||||
Reference in New Issue
Block a user