mirror of
https://gitcode.com/gh_mirrors/hy/Hydro.git
synced 2026-10-20 01:38:19 +08:00
workspace: upgrade to cordis@4.0.0-beta.1, fix #975
This commit is contained in:
34 files changed
+87
-88
No files matched your search
@@ -55,7 +55,7 @@ export function apply(ctx: Context) {
|
||||
const registry = createRegistry(ctx);
|
||||
ctx.on('metrics', (id, metrics) => { instances[id] = metrics; });
|
||||
let pushError = '';
|
||||
ctx.setInterval(async () => {
|
||||
ctx.interval(async () => {
|
||||
try {
|
||||
const [gateway, name, pass] = SystemModel.getMany(['prom-client.gateway', 'prom-client.name', 'prom-client.password']);
|
||||
if (gateway) {
|
||||
|
||||
@@ -75,6 +75,6 @@ export function createRegistry(ctx: Context) {
|
||||
|
||||
collectDefaultMetrics({ register: registry });
|
||||
|
||||
ctx.set('metrics', registry);
|
||||
ctx.provide('metrics', registry);
|
||||
return registry;
|
||||
}
|
||||
Reference in new issue
Block a user