mirror of
https://github.com/sune-org/ORP.git
synced 2026-01-13 16:17:59 +00:00
Refactor: Ensure heartbeat alarm is always cleared
This commit is contained in:
1
index.js
1
index.js
@@ -358,7 +358,6 @@ export class MyDurableObject {
|
|||||||
}
|
}
|
||||||
|
|
||||||
async stopHeartbeat() {
|
async stopHeartbeat() {
|
||||||
if (!this.hbActive) return;
|
|
||||||
this.hbActive = false;
|
this.hbActive = false;
|
||||||
const ageSeconds = (this.age * HB_INTERVAL_MS) / 1000;
|
const ageSeconds = (this.age * HB_INTERVAL_MS) / 1000;
|
||||||
this.notify(`Run ${this.rid} ended. Phase: ${this.phase}. Age: ${ageSeconds.toFixed(1)}s.`, 3, ['stop_sign']);
|
this.notify(`Run ${this.rid} ended. Phase: ${this.phase}. Age: ${ageSeconds.toFixed(1)}s.`, 3, ['stop_sign']);
|
||||||
|
|||||||
Reference in New Issue
Block a user