Skip to content

Commit

Permalink
nipapd: Fork also when running in foreground
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
garberg committed Oct 8, 2024
1 parent 012db19 commit 0a4c5cf
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions nipap/nipapd
Original file line number Diff line number Diff line change
Expand Up @@ -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)

Expand Down

0 comments on commit 0a4c5cf

Please sign in to comment.