Improve logging
This commit is contained in:
@@ -209,16 +209,23 @@ class Watch {
|
||||
initialAlertFunc = this.#watchObjects[watchUUID].initialAlertFunc;
|
||||
}
|
||||
|
||||
// Create timer to run initial alert rule
|
||||
// Set alert state
|
||||
this.#watchObjects[watchUUID].alert = true;
|
||||
|
||||
// Execute initial alert function or create timer to run initial alert rule if required
|
||||
if (this.#watchObjects[watchUUID].alertDelay == '') {
|
||||
console.log('Run initial alert function for watchObject ' + watchUUID);
|
||||
initialAlertFunc();
|
||||
} else {
|
||||
console.log('Run initial alert function for watchObject ' + watchUUID + ' with delay setting ' + this.#watchObjects[watchUUID].alertDelay);
|
||||
this.#watchObjects[watchUUID].startAlertTimer = actions.ScriptExecution.createTimer('startAlert ' + watchUUID,
|
||||
time.toZDT(this.#watchObjects[watchUUID].alertDelay),
|
||||
() => {
|
||||
console.log('Run initial alert function for watchObject ' + watchUUID);
|
||||
initialAlertFunc();
|
||||
}
|
||||
|
||||
);
|
||||
}
|
||||
|
||||
// Create timer to run repeat alert rule if required
|
||||
if (this.#watchObjects[watchUUID].alertRepeat != '') {
|
||||
|
||||
Reference in New Issue
Block a user