mirror of
https://github.com/gotenberg/gotenberg.git
synced 2026-08-08 00:22:14 +01:00
fix(chromium): info log into debug log + slight improvement of the killing of stuck processes
This commit is contained in:
@@ -168,7 +168,7 @@ func (b *chromiumBrowser) Stop(logger *zap.Logger) error {
|
||||
// See:
|
||||
// https://github.com/SeleniumHQ/docker-selenium/blob/7216d060d86872afe853ccda62db0dfab5118dc7/NodeChrome/chrome-cleanup.sh
|
||||
// https://github.com/SeleniumHQ/docker-selenium/blob/7216d060d86872afe853ccda62db0dfab5118dc7/NodeChromium/chrome-cleanup.sh
|
||||
go func() {
|
||||
|
||||
// Clean up stuck processes.
|
||||
ps, err := process.Processes()
|
||||
if err != nil {
|
||||
@@ -192,12 +192,13 @@ func (b *chromiumBrowser) Stop(logger *zap.Logger) error {
|
||||
if err != nil {
|
||||
logger.Error(fmt.Sprintf("kill process: %v", err))
|
||||
} else {
|
||||
logger.Info(fmt.Sprintf("Chromium process %d killed", p.Pid))
|
||||
logger.Debug(fmt.Sprintf("Chromium process %d killed", p.Pid))
|
||||
}
|
||||
}()
|
||||
}
|
||||
}
|
||||
|
||||
go func() {
|
||||
// FIXME: Chromium seems to recreate the user profile directory
|
||||
// right after its deletion if we do not wait a certain amount
|
||||
// of time before deleting it.
|
||||
|
||||
Reference in New Issue
Block a user