mirror of
https://gitcode.com/gh_mirrors/hy/Hydro.git
synced 2026-10-20 17:46:28 +08:00
core: judge: bug fix
This commit is contained in:
9 files changed
+20
-23
No files matched your search
@@ -50,7 +50,7 @@ export function apply(ctx: Context) {
|
||||
const [gateway, name, pass] = SystemModel.getMany(['prom-client.gateway', 'prom-client.name', 'prom-client.password']);
|
||||
if (gateway) {
|
||||
const prefix = gateway.endsWith('/') ? gateway : `${gateway}/`;
|
||||
const endpoint = `${prefix}metrics/job/hydro-web/instance/${encodeURIComponent(hostname())}:${process.env.HYDRO_INSTANCE}`;
|
||||
const endpoint = `${prefix}metrics/job/hydro-web/instance/${encodeURIComponent(hostname())}:${process.env.NODE_APP_INSTANCE}`;
|
||||
let req = superagent.post(endpoint);
|
||||
if (name) req = req.set('Authorization', `Basic ${Buffer.from(`${name}:${pass}`).toString('base64')}`);
|
||||
await req.send(await registry.metrics());
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@hydrooj/prom-client",
|
||||
"version": "0.1.6",
|
||||
"version": "0.1.7",
|
||||
"main": "index.ts",
|
||||
"dependencies": {
|
||||
"prom-client": "^15.1.0"
|
||||
|
||||
Reference in new issue
Block a user