mirror of https://git.sr.ht/~sircmpwn/fosspay
The signal can only be used on the main thread and not the flask sub process one. Signed-off-by: Reed Wade <reedwade@misterbanal.net>master
parent
152205c886
commit
3b957a1b96
@ -1,12 +1,16 @@ |
|||||||
#!/usr/bin/env python3 |
#!/usr/bin/env python3 |
||||||
from fosspay.app import app |
from fosspay.app import app |
||||||
from fosspay.config import _cfg, _cfgi |
from fosspay.config import _cfg, _cfgi, load_config |
||||||
|
|
||||||
import os |
import os |
||||||
|
|
||||||
app.static_folder = os.path.join(os.getcwd(), "static") |
app.static_folder = os.path.join(os.getcwd(), "static") |
||||||
|
|
||||||
import os |
import os |
||||||
|
import signal |
||||||
|
|
||||||
|
signal.signal(signal.SIGHUP, lambda *args: load_config()) |
||||||
|
|
||||||
if __name__ == '__main__': |
if __name__ == '__main__': |
||||||
app.run(host=_cfg("debug-host"), port=_cfgi('debug-port'), debug=True) |
app.run(host=_cfg("debug-host"), port=_cfgi('debug-port'), debug=True) |
||||||
|
|
||||||
|
Loading…
Reference in new issue