Skip to content
This repository has been archived by the owner on Apr 26, 2024. It is now read-only.

Commit

Permalink
Fix SIGHUP handler (#8697)
Browse files Browse the repository at this point in the history
Fixes:

```
builtins.TypeError: _reload_logging_config() takes 1 positional argument but 2 were given
```
  • Loading branch information
richvdh authored Nov 6, 2020
1 parent c3119d1 commit fb56dfd
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
1 change: 1 addition & 0 deletions changelog.d/8697.misc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Re-organize the structured logging code to separate the TCP transport handling from the JSON formatting.
5 changes: 2 additions & 3 deletions synapse/app/_base.py
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,6 @@ def register_sighup(func, *args, **kwargs):
Args:
func (function): Function to be called when sent a SIGHUP signal.
Will be called with a single default argument, the homeserver.
*args, **kwargs: args and kwargs to be passed to the target function.
"""
_sighup_callbacks.append((func, args, kwargs))
Expand Down Expand Up @@ -251,13 +250,13 @@ def handle_sighup(*args, **kwargs):
sdnotify(b"RELOADING=1")

for i, args, kwargs in _sighup_callbacks:
i(hs, *args, **kwargs)
i(*args, **kwargs)

sdnotify(b"READY=1")

signal.signal(signal.SIGHUP, handle_sighup)

register_sighup(refresh_certificate)
register_sighup(refresh_certificate, hs)

# Load the certificate from disk.
refresh_certificate(hs)
Expand Down

0 comments on commit fb56dfd

Please sign in to comment.