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

Method message

packages/hydrooj/src/handler/record.ts:322–328  ·  view source on GitHub ↗
(msg: { rids: string[] })

Source from the content-addressed store, hash-verified

320 }
321
322 async message(msg: { rids: string[] }) {
323 if (!(msg.rids instanceof Array)) return;
324 const rids = msg.rids.map((id) => new ObjectId(id));
325 const rdocs = await record.getMulti(this.args.domainId, { _id: { $in: rids } })
326 .project<RecordDoc>(buildProjection(record.PROJECTION_LIST)).toArray();
327 for (const rdoc of rdocs) this.onRecordChange(rdoc);
328 }
329
330 @subscribe('record/change')
331 async onRecordChange(rdoc: RecordDoc) {

Callers

nothing calls this directly

Calls 3

onRecordChangeMethod · 0.95
buildProjectionFunction · 0.90
getMultiMethod · 0.45

Tested by

no test coverage detected