MCPcopy Create free account
hub / github.com/hydro-dev/Hydro / SystemCheckConnHandler

Class SystemCheckConnHandler

packages/hydrooj/src/handler/manage.ts:60–78  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

58}
59
60class SystemCheckConnHandler extends ConnectionHandler {
61 id: string;
62
63 async prepare() {
64 this.checkPriv(PRIV.PRIV_EDIT_SYSTEM);
65 await this.check();
66 }
67
68 async check() {
69 const log = (payload: any) => this.send({ type: 'log', payload });
70 const warn = (payload: any) => this.send({ type: 'warn', payload });
71 const error = (payload: any) => this.send({ type: 'error', payload });
72 await this.ctx.check.run(this, log, warn, error, (id) => { this.id = id; });
73 }
74
75 async cleanup() {
76 this.ctx.check.cancel(this.id);
77 }
78}
79
80class SystemDashboardHandler extends SystemHandler {
81 async get() {

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected