feat: disable automatic machine alert tickets
This commit is contained in:
parent
7951bc25a3
commit
ac986410a3
2 changed files with 21 additions and 3 deletions
|
|
@ -349,7 +349,7 @@ async function evaluatePostureAndMaybeRaise(
|
|||
const lastAtPrev = ensureFiniteNumber(prevMeta?.["lastPostureAt"]) ?? 0
|
||||
await ctx.db.patch(machine._id, { metadata: mergeMetadata(machine.metadata, record), updatedAt: now })
|
||||
|
||||
if ((process.env["MACHINE_ALERTS_CREATE_TICKETS"] ?? "true").toLowerCase() !== "true") return
|
||||
if ((process.env["MACHINE_ALERTS_CREATE_TICKETS"] ?? "false").toLowerCase() !== "true") return
|
||||
if (lastAtPrev && now - lastAtPrev < 30 * 60 * 1000) return
|
||||
|
||||
const subject = `Alerta de máquina: ${machine.hostname}`
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue