From 0a4c5cfccff4e5be93e39861c56d7d78b567c40d Mon Sep 17 00:00:00 2001 From: Lukas Garberg Date: Mon, 27 May 2024 16:04:49 +0200 Subject: [PATCH] nipapd: Fork also when running in foreground Since forever nipapd have avoided to fork multiple processes when running in forground. I think the idea was to simplify debugging etc, never to be used in production. However, when deploying nipapd as a Docker container the process is running is foreground by default also in production and thus the behaviour is now changed to fork also for that case. --- nipap/nipapd | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/nipap/nipapd b/nipap/nipapd index d381ea0d6..4dc2b6b59 100755 --- a/nipap/nipapd +++ b/nipap/nipapd @@ -329,8 +329,8 @@ if __name__ == '__main__': except: pass - # pre-fork if we are not running in foreground - if not cfg.getboolean('nipapd', 'foreground') and num_forks is not False: + # pre-fork unless explicitly disabled + if num_forks is not False: # default is to fork as many processes as there are cores tornado.process.fork_processes(num_forks)