Skip to content

Commit de411c9

Browse files
authored
fix: remove under-pressure (#146)
1 parent 6bc9488 commit de411c9

File tree

4 files changed

+5
-29
lines changed

4 files changed

+5
-29
lines changed

package-lock.json

+1-23
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

+1-2
Original file line numberDiff line numberDiff line change
@@ -43,8 +43,7 @@
4343
"pg-listen": "^1.7.0",
4444
"pino": "^7.8.0",
4545
"pkg": "^5.5.2",
46-
"postgres-migrations": "^5.3.0",
47-
"under-pressure": "^5.8.0"
46+
"postgres-migrations": "^5.3.0"
4847
},
4948
"devDependencies": {
5049
"@types/busboy": "^1.3.0",

src/admin-app.ts

+1-2
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,10 @@
11
import fastify, { FastifyInstance, FastifyServerOptions } from 'fastify'
2-
import underPressure from 'under-pressure'
32
import tenantRoutes from './routes/tenant'
43

54
const build = (opts: FastifyServerOptions = {}): FastifyInstance => {
65
const app = fastify(opts)
76
app.register(tenantRoutes, { prefix: 'tenants' })
8-
app.register(underPressure, { exposeStatusRoute: true, maxEventLoopUtilization: 0.99 })
7+
app.get('/status', async (request, response) => response.status(200).send())
98
return app
109
}
1110

src/app.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
import fastify, { FastifyInstance, FastifyServerOptions } from 'fastify'
22
import fastifyMultipart from 'fastify-multipart'
33
import fastifySwagger from 'fastify-swagger'
4-
import underPressure from 'under-pressure'
54
import bucketRoutes from './routes/bucket/'
65
import objectRoutes from './routes/object'
76
import { authSchema } from './schemas/auth'
@@ -55,7 +54,8 @@ const build = (opts: buildOpts = {}): FastifyInstance => {
5554
app.register(logTenantId)
5655
app.register(bucketRoutes, { prefix: 'bucket' })
5756
app.register(objectRoutes, { prefix: 'object' })
58-
app.register(underPressure, { exposeStatusRoute: true })
57+
58+
app.get('/status', async (request, response) => response.status(200).send())
5959

6060
return app
6161
}

0 commit comments

Comments
 (0)