diff options
author | Jacob Vosmaer (GitLab) <jacob@gitlab.com> | 2018-01-29 20:00:52 +0300 |
---|---|---|
committer | Jacob Vosmaer (GitLab) <jacob@gitlab.com> | 2018-01-29 20:00:52 +0300 |
commit | bc902a1c86b85bd3ae2dcea733b4402ca1a81ea6 (patch) | |
tree | 0c0ae3b412e24ce502c47175867bb0c6cb1c578f /internal/rubyserver | |
parent | 8537c30b8f36fb6dac6bbdc549169d7dc0eb5a98 (diff) |
Wait between ruby worker removal from pool and graceful shutdown
Diffstat (limited to 'internal/rubyserver')
-rw-r--r-- | internal/rubyserver/worker.go | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/internal/rubyserver/worker.go b/internal/rubyserver/worker.go index 79f80334b..41de27a6d 100644 --- a/internal/rubyserver/worker.go +++ b/internal/rubyserver/worker.go @@ -137,6 +137,10 @@ func (w *worker) monitor() { } func (w *worker) waitTerminate(pid int) { + // Wait for in-flight requests to reach the worker before we slam the + // door in their face. + time.Sleep(1 * time.Minute) + terminationCounter.WithLabelValues(w.Name).Inc() log.WithFields(log.Fields{ |