Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #88147

Re: What is elegant way to do configuration on server app

References <CAEKwp_FsbbAOrBm1h-CE1PS358pJBadJqNDi1CN7upC_s3nqCw@mail.gmail.com> <mailman.189.1427360350.10327.python-list@python.org> <mf19qa$ii6$2@reader1.panix.com> <87h9t6n7wi.fsf@elektro.pacujo.net>
Date 2015-03-28 00:12 +1100
Subject Re: What is elegant way to do configuration on server app
From Chris Angelico <rosuav@gmail.com>
Newsgroups comp.lang.python
Message-ID <mailman.246.1427461945.10327.python-list@python.org> (permalink)

Show all headers | View raw


On Fri, Mar 27, 2015 at 7:47 PM, Marko Rauhamaa <marko@pacujo.net> wrote:
> Grant Edwards <invalid@invalid.invalid>:
>
>> That sounds rather Windowsesque. The more-or-less standard way to do
>> handle the situation on Unix is to reread the config file when you get
>> a SIGHUP.
>
> That, indeed, is the classic Unix way. However, Linux has now moved to
> systemd:
>
>        Note however that reloading a daemon by sending a signal (as with
>        the example line above) is usually not a good choice, because
>        this is an asynchronous operation and hence not suitable to order
>        reloads of multiple services against each other. It is strongly
>        recommended to set ExecReload= to a command that not only
>        triggers a configuration reload of the daemon, but also
>        synchronously waits for it to complete.

The number of cases where this matters is fairly low. Doing the reload
asynchronously is generally sufficient. And even if you have something
that waits for the reload to finish, you'll usually fire-and-forget
that command anyway.

For maximum portability, most programs are going to want to continue
to respond to SIGHUP, even if they do a systemd-triggered reload some
other way.

ChrisA

Back to comp.lang.python | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

Re: What is elegant way to do configuration on server app Ben Finney <ben+python@benfinney.id.au> - 2015-03-26 19:59 +1100
  Re: What is elegant way to do configuration on server app Grant Edwards <invalid@invalid.invalid> - 2015-03-26 15:49 +0000
    Re: What is elegant way to do configuration on server app Jerry OELoo <oyljerry@gmail.com> - 2015-03-27 16:28 +0800
      Re: What is elegant way to do configuration on server app Grant Edwards <invalid@invalid.invalid> - 2015-03-27 16:28 +0000
        Re: What is elegant way to do configuration on server app Chris Angelico <rosuav@gmail.com> - 2015-03-28 03:36 +1100
          Re: What is elegant way to do configuration on server app Grant Edwards <invalid@invalid.invalid> - 2015-03-27 16:44 +0000
    Re: What is elegant way to do configuration on server app Marko Rauhamaa <marko@pacujo.net> - 2015-03-27 10:47 +0200
      Re: What is elegant way to do configuration on server app Chris Angelico <rosuav@gmail.com> - 2015-03-28 00:12 +1100
        Re: What is elegant way to do configuration on server app Marko Rauhamaa <marko@pacujo.net> - 2015-03-27 15:23 +0200
          Re: What is elegant way to do configuration on server app Chris Angelico <rosuav@gmail.com> - 2015-03-28 00:34 +1100
      Re: What is elegant way to do configuration on server app Grant Edwards <invalid@invalid.invalid> - 2015-03-27 16:30 +0000
        Re: What is elegant way to do configuration on server app Marko Rauhamaa <marko@pacujo.net> - 2015-03-27 18:44 +0200

csiph-web