You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

22 lines
449 B
JavaScript

const debug = require("debug")("action-dashboard:runstatus");
class RunStatus {
start(server) {
debug("initializing");
const io = require("socket.io")(server);
io.on("connection", (client) => {
debug("connected");
this._client = client;
});
}
updatedRun(run) {
if (this._client) {
debug(`emitting updatedRun: `, run);
this._client.emit("updatedRun", run);
}
}
}
module.exports = RunStatus;