def signal_int_handler(signal, frame):
    logger.info("Home Daemon Receiver got SIGINT !")
    cleanup()
    sys.exit(0)
def signal_term_handler(signal, frame):
    logger.info("Home Daemon Receiver got SIGTERM !")
    cleanup()
    sys.exit(0)
#!/usr/bin/env python
# -*- coding: utf-8 -*-

# logging
from home_daemon_logging import logger
logger.info("Home Daemon Receiver Starting !")

# imports
import sys, signal, time
from home_serial import home_serial
from home_mysql import home_mysql

# declare variables
ser = None

string = ""
array = ""
query = ""

# serial
_home_serial = home_serial()
_home_serial.connect()

# mysql
_home_mysql = home_mysql()
_home_mysql.connect()

# cleanup
def cleanup():
    global _home_mysql
    del _home_mysql
Beispiel #4
0
def signal_int_handler(signal, frame):
    logger.info("Home Daemon Receiver got SIGINT !")
    cleanup()
    sys.exit(0)
Beispiel #5
0
def signal_term_handler(signal, frame):
    logger.info("Home Daemon Receiver got SIGTERM !")
    cleanup()
    sys.exit(0)
Beispiel #6
0
#!/usr/bin/env python
# -*- coding: utf-8 -*-

# logging
from home_daemon_logging import logger
logger.info("Home Daemon Receiver Starting !")

# imports
import sys, signal, time
from home_serial import home_serial
from home_mysql import home_mysql

# declare variables
ser = None

string = ""
array = ""
query = ""

# serial
_home_serial = home_serial()
_home_serial.connect()

# mysql
_home_mysql = home_mysql()
_home_mysql.connect()


# cleanup
def cleanup():
    global _home_mysql