mirror of
https://github.com/overleaf/overleaf.git
synced 2024-11-07 20:31:06 -05:00
Merge pull request #12993 from overleaf/jpa-configurable-request-threshold
[spelling] make ASpellWorkerPool.MAX_REQUESTS configurable via env var GitOrigin-RevId: babedafb16b05f53ba0fefc73250bcf623ec4f89
This commit is contained in:
parent
0940437772
commit
480148bf1c
2 changed files with 5 additions and 1 deletions
|
@ -8,6 +8,7 @@
|
|||
* Full docs: https://github.com/decaffeinate/decaffeinate/blob/master/docs/suggestions.md
|
||||
*/
|
||||
import _ from 'underscore'
|
||||
import Settings from '@overleaf/settings'
|
||||
import logger from '@overleaf/logger'
|
||||
import metrics from '@overleaf/metrics'
|
||||
import OError from '@overleaf/o-error'
|
||||
|
@ -15,7 +16,7 @@ import { ASpellWorker } from './ASpellWorker.js'
|
|||
|
||||
export class ASpellWorkerPool {
|
||||
static initClass() {
|
||||
this.prototype.MAX_REQUESTS = 100 * 1024
|
||||
this.prototype.MAX_REQUESTS = Settings.maxRequestsPerWorker
|
||||
this.prototype.MAX_WORKERS = 32
|
||||
this.prototype.MAX_IDLE_TIME = 1000
|
||||
this.prototype.MAX_REQUEST_TIME = 60 * 1000
|
||||
|
|
|
@ -8,6 +8,9 @@ module.exports = {
|
|||
},
|
||||
},
|
||||
|
||||
maxRequestsPerWorker:
|
||||
parseInt(process.env.MAX_REQUESTS_PER_WORKER, 10) || 100 * 1024,
|
||||
|
||||
cacheDir: Path.resolve('cache'),
|
||||
|
||||
healthCheckUserId: '53c64d2fd68c8d000010bb5f',
|
||||
|
|
Loading…
Reference in a new issue