Skip to content

Commit

Permalink
set timeouts in main
Browse files Browse the repository at this point in the history
  • Loading branch information
kyostiebi authored and garrettjstevens committed Oct 10, 2023
1 parent 84a7fe1 commit be378da
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
5 changes: 4 additions & 1 deletion packages/apollo-collaboration-server/src/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,10 @@ async function bootstrap() {
}),
)

await app.listen(PORT)
// await app.listen(PORT)
const server = await app.listen(PORT)
server.headersTimeout = 24 * 60 * 60 * 1000 // one day
server.requestTimeout = 24 * 60 * 60 * 1000 // one day
// eslint-disable-next-line no-console
console.log(
`Application is running on: ${await app.getUrl()}, CORS = ${cors}`,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,8 @@ export class FileStorageEngine implements StorageEngine {
const zlib = require('node:zlib')
// Check md5 checksum of saved file
const fileWriteStream = createWriteStream(tempFullFileName)
const gz = createGzip({ level: zlib.constants.Z_BEST_SPEED }) // BEST_SPEED option must be used in order to process also FASTA files > 1 GB (in Node 18 onwards)
// const gz = createGzip({ level: zlib.constants.Z_BEST_SPEED }) // BEST_SPEED option must be used in order to process also FASTA files > 1 GB (in Node 18 onwards)
const gz = createGzip() // BEST_SPEED option must be used in order to process also FASTA files > 1 GB (in Node 18 onwards)
await pipeline(file.stream, gz, fileWriteStream)
this.logger.debug(`Compressed file: ${tempFullFileName}`)
const fileChecksum = hash.digest('hex')
Expand Down

0 comments on commit be378da

Please sign in to comment.