mirror of
https://github.com/gotenberg/gotenberg.git
synced 2026-08-18 21:22:15 +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:
|
// See:
|
||||||
// https://github.com/SeleniumHQ/docker-selenium/blob/7216d060d86872afe853ccda62db0dfab5118dc7/NodeChrome/chrome-cleanup.sh
|
// https://github.com/SeleniumHQ/docker-selenium/blob/7216d060d86872afe853ccda62db0dfab5118dc7/NodeChrome/chrome-cleanup.sh
|
||||||
// https://github.com/SeleniumHQ/docker-selenium/blob/7216d060d86872afe853ccda62db0dfab5118dc7/NodeChromium/chrome-cleanup.sh
|
// https://github.com/SeleniumHQ/docker-selenium/blob/7216d060d86872afe853ccda62db0dfab5118dc7/NodeChromium/chrome-cleanup.sh
|
||||||
go func() {
|
|
||||||
// Clean up stuck processes.
|
// Clean up stuck processes.
|
||||||
ps, err := process.Processes()
|
ps, err := process.Processes()
|
||||||
if err != nil {
|
if err != nil {
|
||||||
@@ -192,12 +192,13 @@ func (b *chromiumBrowser) Stop(logger *zap.Logger) error {
|
|||||||
if err != nil {
|
if err != nil {
|
||||||
logger.Error(fmt.Sprintf("kill process: %v", err))
|
logger.Error(fmt.Sprintf("kill process: %v", err))
|
||||||
} else {
|
} 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
|
// FIXME: Chromium seems to recreate the user profile directory
|
||||||
// right after its deletion if we do not wait a certain amount
|
// right after its deletion if we do not wait a certain amount
|
||||||
// of time before deleting it.
|
// of time before deleting it.
|
||||||
|
|||||||
Reference in New Issue
Block a user