monolith/utils/cleanup.py
Mark Veidemanis 3229d9b806 Revert "Reformat project"
This reverts commit 64e3e1160aa76d191740342ab3edc68807f890fb.
2022-07-21 13:40:01 +01:00

18 lines
323 B
Python

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