From 9445e13a3e445bcb35d5aa2f19ef1c6e558b7c25 Mon Sep 17 00:00:00 2001 From: Mathias Wagner Date: Sun, 28 May 2023 21:52:58 +0200 Subject: [PATCH] Updated the comments in the integrations.js --- server/tasks/integrations.js | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/server/tasks/integrations.js b/server/tasks/integrations.js index 8208e9bf..6d6e594f 100644 --- a/server/tasks/integrations.js +++ b/server/tasks/integrations.js @@ -9,7 +9,7 @@ module.exports.setState = (state = "ping") => { currentState = state; } -// Send a ping to the provided healthcheck server +// Send a ping to the event system module.exports.sendPing = async (type, message) => { await triggerEvent("minutePassed", {type, message}); } @@ -19,16 +19,17 @@ module.exports.sendCurrent = async () => { if (currentState === "ping") await this.sendPing(); } -// Sends an error to the healthcheck server +// Sends an 'error' ping to the event system module.exports.sendError = async (error = "Unknown error") => { await triggerEvent("testFailed", error); } -// Sends a 'running' ping to the healthcheck server +// Sends a 'running' ping to the event system module.exports.sendRunning = async () => { await triggerEvent("testStarted"); } +// Sends a 'finished' ping to the event system module.exports.sendFinished = async (data) => { await triggerEvent("testFinished", data); }