20 lines
325 B
Python
20 lines
325 B
Python
import sys
|
|
|
|
from twisted.internet import reactor
|
|
|
|
import main
|
|
from utils.logging.debug import debug
|
|
from utils.logging.log import *
|
|
|
|
|
|
def handler(sig, frame):
|
|
log("Received SIGINT, cleaning up")
|
|
cleanup()
|
|
|
|
|
|
def cleanup():
|
|
debug("Flushing Redis database")
|
|
main.r.flushdb()
|
|
reactor.stop()
|
|
# sys.exit(1)
|