New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@axah/koa

Package Overview
Dependencies
Maintainers
11
Versions
159
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@axah/koa - npm Package Compare versions

Comparing version 0.0.0-20231011072643 to 0.0.0-20231011083437

9

lib/health-check.js

@@ -10,5 +10,2 @@ "use strict";

exports.markServiceAsReady = markServiceAsReady;
const giveTimeForLogToFlushAndFilebeatToReadTheLogs = () => new Promise((resolve) => {
setTimeout(resolve, 15000);
});
const setupHealthChecks = ({ server, log, cleanup, shutdownTimeout = 30000, }) => {

@@ -29,9 +26,7 @@ const healthChecks = {

timeout: shutdownTimeout,
beforeShutdown: () => Promise.resolve(log.info('Terminus received SIGTERM. Will stop server gracefully')),
// eslint-disable-next-line @typescript-eslint/require-await
beforeShutdown: async () => log.info('Terminus received SIGTERM. Will stop server gracefully'),
onShutdown: async () => {
log.info('Terminus has gracefully shutdown. Will execute cleanup next');
await cleanup.runCleanupManually();
log.info('Cleanup has successfully finished. Will wait now for logs to flush');
log.flush();
await giveTimeForLogToFlushAndFilebeatToReadTheLogs();
},

@@ -38,0 +33,0 @@ logger: (msg, err) => log.error({ err }, `Terminus health check error with message: ${msg}`),

@@ -126,2 +126,5 @@ "use strict";

return async function middleware(ctx, next) {
if (ctx.url.startsWith('/_health')) {
return next();
}
const mdc = parseMdcFromHeaders(logger, ctx.req.headers);

@@ -128,0 +131,0 @@ return mdcAls.run(mdc, () => {

{
"name": "@axah/koa",
"version": "0.0.0-20231011072643",
"version": "0.0.0-20231011083437",
"main": "lib/index.js",

@@ -5,0 +5,0 @@ "license": "UNLICENSED",

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc