Skip to content

Commit b8fd42f

Browse files
committed
fix: remove memory leak detection
1 parent 7329e36 commit b8fd42f

File tree

5 files changed

+5799
-8657
lines changed

5 files changed

+5799
-8657
lines changed

app.js

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,6 @@ const swaggerUi = require('swagger-ui-express')
1818
const YAML = require('yamljs')
1919
const authenticator = require('tc-core-library-js').middleware.jwtAuthenticator
2020
const fileUpload = require('express-fileupload')
21-
const memwatch = require('memwatch-next')
2221

2322
const swaggerDocument = YAML.load('./docs/swagger.yaml')
2423
const app = express()
@@ -31,19 +30,6 @@ app.use(bodyParser.urlencoded({ limit: '50mb', extended: true }))
3130
app.use(cors())
3231
app.use(fileUpload())
3332

34-
memwatch.on('leak', function (info) {
35-
winston.info(`Memory leak detected, details: ${info}`)
36-
const reqBody = {
37-
topic: 'common.error.reporting',
38-
originator: 'submission-api',
39-
timestamp: (new Date()).toISOString(), // time when submission was created
40-
'mime-type': 'application/json',
41-
payload: info
42-
}
43-
44-
helper.postToBusApi(reqBody)
45-
})
46-
4733
const apiRouter = express.Router()
4834

4935
/**

docker/Dockerfile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,5 +8,5 @@ COPY . /submissions-api
88
WORKDIR /submissions-api
99

1010
# Install the dependencies from package.json
11-
RUN npm install
12-
ENTRYPOINT npm start
11+
RUN yarn install
12+
ENTRYPOINT yarn start

0 commit comments

Comments
 (0)