mirror of
https://github.com/SickGear/SickGear.git
synced 2024-12-11 05:33:37 +00:00
Merge remote-tracking branch 'origin/dev'
This commit is contained in:
commit
9b20ec56e4
2 changed files with 10 additions and 13 deletions
19
SickBeard.py
19
SickBeard.py
|
@ -76,7 +76,6 @@ signal.signal(signal.SIGTERM, sickbeard.sig_handler)
|
||||||
|
|
||||||
throwaway = datetime.datetime.strptime('20110101', '%Y%m%d')
|
throwaway = datetime.datetime.strptime('20110101', '%Y%m%d')
|
||||||
|
|
||||||
|
|
||||||
def loadShowsFromDB():
|
def loadShowsFromDB():
|
||||||
"""
|
"""
|
||||||
Populates the showList with shows from the database
|
Populates the showList with shows from the database
|
||||||
|
@ -303,6 +302,12 @@ def main():
|
||||||
MAX_DB_VERSION) + ").\n" + \
|
MAX_DB_VERSION) + ").\n" + \
|
||||||
"If you have used other forks of SB, your database may be unusable due to their modifications.")
|
"If you have used other forks of SB, your database may be unusable due to their modifications.")
|
||||||
|
|
||||||
|
if sickbeard.DAEMON:
|
||||||
|
daemonize()
|
||||||
|
|
||||||
|
# Use this PID for everything
|
||||||
|
sickbeard.PID = os.getpid()
|
||||||
|
|
||||||
# Initialize the config and our threads
|
# Initialize the config and our threads
|
||||||
sickbeard.initialize(consoleLogging=consoleLogging)
|
sickbeard.initialize(consoleLogging=consoleLogging)
|
||||||
|
|
||||||
|
@ -341,7 +346,7 @@ def main():
|
||||||
'handle_reverse_proxy': sickbeard.HANDLE_REVERSE_PROXY,
|
'handle_reverse_proxy': sickbeard.HANDLE_REVERSE_PROXY,
|
||||||
'https_cert': sickbeard.HTTPS_CERT,
|
'https_cert': sickbeard.HTTPS_CERT,
|
||||||
'https_key': sickbeard.HTTPS_KEY,
|
'https_key': sickbeard.HTTPS_KEY,
|
||||||
}
|
}
|
||||||
|
|
||||||
# init tornado
|
# init tornado
|
||||||
webserveInit.initWebServer(options)
|
webserveInit.initWebServer(options)
|
||||||
|
@ -362,7 +367,7 @@ def main():
|
||||||
if forceUpdate or sickbeard.UPDATE_SHOWS_ON_START:
|
if forceUpdate or sickbeard.UPDATE_SHOWS_ON_START:
|
||||||
sickbeard.showUpdateScheduler.action.run(force=True) # @UndefinedVariable
|
sickbeard.showUpdateScheduler.action.run(force=True) # @UndefinedVariable
|
||||||
|
|
||||||
# get ioloop
|
# create ioloop
|
||||||
io_loop = IOLoop.current()
|
io_loop = IOLoop.current()
|
||||||
|
|
||||||
# init startup tasks
|
# init startup tasks
|
||||||
|
@ -373,16 +378,8 @@ def main():
|
||||||
if sickbeard.AUTO_UPDATE:
|
if sickbeard.AUTO_UPDATE:
|
||||||
tornado.autoreload.start(io_loop)
|
tornado.autoreload.start(io_loop)
|
||||||
|
|
||||||
if sickbeard.DAEMON:
|
|
||||||
daemonize()
|
|
||||||
|
|
||||||
# Use this PID for everything
|
|
||||||
sickbeard.PID = os.getpid()
|
|
||||||
|
|
||||||
# start IOLoop.
|
|
||||||
io_loop.start()
|
io_loop.start()
|
||||||
sickbeard.saveAndShutdown()
|
sickbeard.saveAndShutdown()
|
||||||
return
|
|
||||||
|
|
||||||
if __name__ == "__main__":
|
if __name__ == "__main__":
|
||||||
if sys.hexversion >= 0x020600F0:
|
if sys.hexversion >= 0x020600F0:
|
||||||
|
|
|
@ -65,7 +65,7 @@ def initWebServer(options={}):
|
||||||
|
|
||||||
# Load the app
|
# Load the app
|
||||||
app = Application([],
|
app = Application([],
|
||||||
debug=sickbeard.DEBUG,
|
debug=False,
|
||||||
gzip=True,
|
gzip=True,
|
||||||
xheaders=sickbeard.HANDLE_REVERSE_PROXY,
|
xheaders=sickbeard.HANDLE_REVERSE_PROXY,
|
||||||
cookie_secret='61oETzKXQAGaYdkL5gEmGeJJFuYh7EQnp2XdTP1o/Vo='
|
cookie_secret='61oETzKXQAGaYdkL5gEmGeJJFuYh7EQnp2XdTP1o/Vo='
|
||||||
|
|
Loading…
Reference in a new issue