mirror of
https://github.com/yu-i-i/overleaf-cep.git
synced 2026-05-25 02:00:10 +02:00
improve metrics of aspool
This commit is contained in:
@@ -11,11 +11,11 @@ class ASpellWorker
|
||||
@count = 0
|
||||
@pipe = child_process.spawn("aspell", ["pipe", "-t", "--encoding=utf-8", "-d", language])
|
||||
logger.info process: @pipe.pid, lang: @language, "starting new aspell worker"
|
||||
metrics.inc "aspellWorker-start", 1, {method: @language}
|
||||
metrics.inc "aspellWorker", 1, {status: "start", method: @language}
|
||||
@pipe.on 'exit', () =>
|
||||
@state = 'killed'
|
||||
logger.info process: @pipe.pid, lang: @language, "aspell worker has exited"
|
||||
metrics.inc "aspellWorker-exit" , 1, {method: @language}
|
||||
metrics.inc "aspellWorker" , 1, {status: "exit", method: @language}
|
||||
@pipe.on 'close', () =>
|
||||
@state = 'closed' unless @state == 'killed'
|
||||
if @callback?
|
||||
|
||||
Reference in New Issue
Block a user