You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
18 lines
315 B
Python
18 lines
315 B
Python
2 years ago
|
from twisted.internet import reactor
|
||
2 years ago
|
|
||
|
import main
|
||
5 years ago
|
from utils.logging.debug import debug
|
||
2 years ago
|
from utils.logging.log import log
|
||
5 years ago
|
|
||
2 years ago
|
|
||
5 years ago
|
def handler(sig, frame):
|
||
|
log("Received SIGINT, cleaning up")
|
||
|
cleanup()
|
||
|
|
||
2 years ago
|
|
||
5 years ago
|
def cleanup():
|
||
|
debug("Flushing Redis database")
|
||
|
main.r.flushdb()
|
||
|
reactor.stop()
|
||
2 years ago
|
# sys.exit(1)
|