cleanup
This commit is contained in:
Vendored
-2
@@ -104,7 +104,6 @@ export class SafelinkClient {
|
|||||||
this.urlCache.set(url, maybeUrlRule)
|
this.urlCache.set(url, maybeUrlRule)
|
||||||
|
|
||||||
addMetrics('ok', false)
|
addMetrics('ok', false)
|
||||||
|
|
||||||
return maybeUrlRule
|
return maybeUrlRule
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
this.urlCache.set(url, 'ok')
|
this.urlCache.set(url, 'ok')
|
||||||
@@ -115,7 +114,6 @@ export class SafelinkClient {
|
|||||||
this.domainCache.set(domain, maybeDomainRule)
|
this.domainCache.set(domain, maybeDomainRule)
|
||||||
|
|
||||||
addMetrics('ok', false)
|
addMetrics('ok', false)
|
||||||
|
|
||||||
return maybeDomainRule
|
return maybeDomainRule
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
this.domainCache.set(domain, 'ok')
|
this.domainCache.set(domain, 'ok')
|
||||||
|
|||||||
@@ -74,6 +74,6 @@ export class Metrics {
|
|||||||
|
|
||||||
async start(port: number) {
|
async start(port: number) {
|
||||||
const server = this.app.listen(port)
|
const server = this.app.listen(port)
|
||||||
await once(server, 'listening')
|
await once(server, 'metrics server listening')
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -98,7 +98,6 @@ export default function (ctx: AppContext, app: Express) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
addMetrics(ruleStr, 302)
|
addMetrics(ruleStr, 302)
|
||||||
|
|
||||||
return res.end(html)
|
return res.end(html)
|
||||||
}),
|
}),
|
||||||
)
|
)
|
||||||
|
|||||||
Reference in New Issue
Block a user