Commit a4bd1e5
feat(base): on_config hook + main-loop deferral for SIGHUP
Adds `on_config` as an overridable hook on `AbstractBase` so
subclasses can react to `SIGHUP` reload signals; the inherited
implementation fires the existing `"config"` trigger.
The `bind_config` signal handler now defers `on_config` to the
main event loop via `delay(immediately=True)` instead of running
it synchronously in the signal-handler context, removing the
reentrancy concern for subclass overrides.
`ConsulProxyServer.on_config` is wired to schedule an extra
`_consul_tick(timeout=0)` so operators can force a Consul
service refresh on `SIGHUP` without waiting for the next poll
cycle.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>1 parent b7c908b commit a4bd1e5
3 files changed
Lines changed: 11 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
9 | 9 | | |
10 | 10 | | |
11 | 11 | | |
12 | | - | |
| 12 | + | |
| 13 | + | |
13 | 14 | | |
14 | 15 | | |
15 | 16 | | |
16 | | - | |
| 17 | + | |
17 | 18 | | |
18 | 19 | | |
19 | 20 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1693 | 1693 | | |
1694 | 1694 | | |
1695 | 1695 | | |
1696 | | - | |
| 1696 | + | |
1697 | 1697 | | |
1698 | 1698 | | |
1699 | 1699 | | |
| |||
3100 | 3100 | | |
3101 | 3101 | | |
3102 | 3102 | | |
| 3103 | + | |
| 3104 | + | |
| 3105 | + | |
3103 | 3106 | | |
3104 | 3107 | | |
3105 | 3108 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
113 | 113 | | |
114 | 114 | | |
115 | 115 | | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
116 | 120 | | |
117 | 121 | | |
118 | 122 | | |
| |||
0 commit comments