mirror of
https://gitcode.com/gh_mirrors/hy/Hydro.git
synced 2026-10-21 01:46:28 +08:00
upgrade to cordis v3 (#733)
Co-authored-by: panda <panda_dtdyy@outlook.com>
This commit is contained in:
1 parent
498cd57016
commit
a56b1650be
33 files changed
+301
-262
No files matched your search
@@ -9,8 +9,6 @@ declare module 'hydrooj' {
|
||||
}
|
||||
}
|
||||
|
||||
Context.service('metrics');
|
||||
|
||||
export function createRegistry(ctx: Context) {
|
||||
const registry = new Registry();
|
||||
|
||||
@@ -77,6 +75,7 @@ export function createRegistry(ctx: Context) {
|
||||
|
||||
collectDefaultMetrics({ register: registry });
|
||||
|
||||
ctx.provide('metrics');
|
||||
ctx.metrics = registry;
|
||||
return registry;
|
||||
}
|
||||
Reference in new issue
Block a user