kopia lustrzana https://github.com/dgtlmoon/changedetection.io
rodzic
8c6f6f1578
commit
108cdf84a5
|
@ -2,7 +2,7 @@
|
||||||
|
|
||||||
# Read more https://github.com/dgtlmoon/changedetection.io/wiki
|
# Read more https://github.com/dgtlmoon/changedetection.io/wiki
|
||||||
|
|
||||||
__version__ = '0.49.10'
|
__version__ = '0.49.11'
|
||||||
|
|
||||||
from changedetectionio.strtobool import strtobool
|
from changedetectionio.strtobool import strtobool
|
||||||
from json.decoder import JSONDecodeError
|
from json.decoder import JSONDecodeError
|
||||||
|
@ -11,6 +11,7 @@ os.environ['EVENTLET_NO_GREENDNS'] = 'yes'
|
||||||
import eventlet
|
import eventlet
|
||||||
import eventlet.wsgi
|
import eventlet.wsgi
|
||||||
import getopt
|
import getopt
|
||||||
|
import platform
|
||||||
import signal
|
import signal
|
||||||
import socket
|
import socket
|
||||||
import sys
|
import sys
|
||||||
|
@ -150,9 +151,13 @@ def main():
|
||||||
from changedetectionio.gc_cleanup import memory_cleanup
|
from changedetectionio.gc_cleanup import memory_cleanup
|
||||||
logger.info('SIGUSR1 received: Running memory cleanup')
|
logger.info('SIGUSR1 received: Running memory cleanup')
|
||||||
return memory_cleanup(app)
|
return memory_cleanup(app)
|
||||||
|
|
||||||
# Register the SIGUSR1 signal handler
|
# Register the SIGUSR1 signal handler
|
||||||
signal.signal(signal.SIGUSR1, sigusr_clean_handler)
|
# Only register the signal handler if running on Linux
|
||||||
|
if platform.system() == "Linux":
|
||||||
|
signal.signal(signal.SIGUSR1, sigusr_clean_handler)
|
||||||
|
else:
|
||||||
|
logger.info("SIGUSR1 handler only registered on Linux, skipped.")
|
||||||
|
|
||||||
# Go into cleanup mode
|
# Go into cleanup mode
|
||||||
if do_cleanup:
|
if do_cleanup:
|
||||||
|
|
Ładowanie…
Reference in New Issue