Skip to content

Commit aa3301c

Browse files
committed
Fix last run metric.
1 parent 360f165 commit aa3301c

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/Scheduler.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -27,9 +27,9 @@ import { Talk } from "./models/Talk";
2727
import { CheckInMap } from "./CheckInMap";
2828
import { ConferenceMatrixClient } from "./ConferenceMatrixClient";
2929
import { IConfig } from "./config";
30-
import { Counter } from "prom-client";
30+
import { Gauge } from "prom-client";
3131

32-
const matrixIdentityApiCallsFailed = new Counter({ name: "confbot_scheduler_last_run", help: "The last time the Scheduler ran its tasks."});
32+
const schedulerLastRunGauge = new Gauge({ name: "confbot_scheduler_last_run", help: "The last time the Scheduler ran its tasks."});
3333

3434
export enum ScheduledTaskType {
3535
TalkStart = "talk_start",
@@ -196,7 +196,7 @@ export class Scheduler {
196196
private async runTasks() {
197197
try {
198198
const now = (new Date()).getTime();
199-
matrixIdentityApiCallsFailed.inc(now);
199+
schedulerLastRunGauge.set(now);
200200
await this.lock.acquireAsync();
201201
LogService.info("Scheduler", "Scheduling tasks");
202202
try {

0 commit comments

Comments
 (0)