Esempio n. 1
0
import sickbeard
from sickbeard import db, failed_history, logger, name_cache, network_timezones
from sickbeard.event_queue import Events
from sickbeard.tv import TVShow
from sickbeard.webserveInit import WebServer

from six import integer_types, moves, PY2

throwaway = datetime.datetime.strptime('20110101', '%Y%m%d')
rollback_loaded = None

for signal_type in [signal.SIGTERM, signal.SIGINT
                    ] + ([] if 'win32' != sys.platform else [signal.SIGBREAK]):
    signal.signal(
        signal_type,
        lambda signum, void: sickbeard.sig_handler(signum=signum, _=void))


class SickGear(object):
    def __init__(self):
        # system event callback for shutdown/restart
        sickbeard.events = Events(self.shutdown)

        # daemon constants
        self.run_as_daemon = False
        self.create_pid = False
        self.pid_file = ''

        self.run_as_systemd = False
        self.console_logging = False
Esempio n. 2
0
from configobj import ConfigObj
from exceptions_helper import ex
import sickbeard
from sickbeard import db, logger, name_cache, network_timezones
from sickbeard.event_queue import Events
from sickbeard.tv import TVShow
from sickbeard.webserveInit import WebServer

from six import integer_types, moves, PY2

throwaway = datetime.datetime.strptime('20110101', '%Y%m%d')
rollback_loaded = None

for signal_type in [signal.SIGTERM, signal.SIGINT] + ([] if 'win32' != sys.platform else [signal.SIGBREAK]):
    signal.signal(signal_type, lambda signum, void: sickbeard.sig_handler(signum=signum, _=void))


class SickGear(object):
    def __init__(self):
        # system event callback for shutdown/restart
        sickbeard.events = Events(self.shutdown)

        # daemon constants
        self.run_as_daemon = False
        self.create_pid = False
        self.pid_file = ''

        self.run_as_systemd = False
        self.console_logging = False