1
0
mirror of https://github.com/moparisthebest/SickRage synced 2024-11-16 14:25:02 -05:00

Testing fix to help reduce memory footprint.

This commit is contained in:
echel0n 2014-06-30 02:23:32 -07:00
parent e7b5a2c6c0
commit 9d5b2da19e
2 changed files with 15 additions and 15 deletions

View File

@ -23,6 +23,7 @@ import functools
import sys import sys
import shutil import shutil
from sickbeard.exceptions import MultipleShowObjectsException
if sys.version_info < (2, 6): if sys.version_info < (2, 6):
print "Sorry, requires Python 2.6 or 2.7." print "Sorry, requires Python 2.6 or 2.7."
@ -84,6 +85,8 @@ def loadShowsFromDB():
Populates the showList with shows from the database Populates the showList with shows from the database
""" """
logger.log(u"Loading initial show list")
myDB = db.DBConnection() myDB = db.DBConnection()
sqlResults = myDB.select("SELECT * FROM tv_shows") sqlResults = myDB.select("SELECT * FROM tv_shows")
@ -329,18 +332,12 @@ def main():
# Initialize the config and our threads # Initialize the config and our threads
sickbeard.initialize(consoleLogging=consoleLogging) sickbeard.initialize(consoleLogging=consoleLogging)
sickbeard.showList = []
if sickbeard.DAEMON: if sickbeard.DAEMON:
daemonize() daemonize()
# Use this PID for everything # Use this PID for everything
sickbeard.PID = os.getpid() sickbeard.PID = os.getpid()
# Build from the DB to start with
logger.log(u"Loading initial show list")
loadShowsFromDB()
if forcedPort: if forcedPort:
logger.log(u"Forcing web server to port " + str(forcedPort)) logger.log(u"Forcing web server to port " + str(forcedPort))
startPort = forcedPort startPort = forcedPort
@ -387,6 +384,9 @@ def main():
sys.exit() sys.exit()
def startup(): def startup():
# Build from the DB to start with
loadShowsFromDB()
# Fire up all our threads # Fire up all our threads
sickbeard.start() sickbeard.start()

View File

@ -90,10 +90,10 @@ traktCheckerScheduler = None
showList = None showList = None
loadingShowList = None loadingShowList = None
providerList = [] providerList = None
newznabProviderList = [] newznabProviderList = None
torrentRssProviderList = [] torrentRssProviderList = None
metadata_provider_dict = {} metadata_provider_dict = None
NEWEST_VERSION = None NEWEST_VERSION = None
NEWEST_VERSION_STRING = None NEWEST_VERSION_STRING = None
@ -161,7 +161,7 @@ INDEXER_DEFAULT = None
INDEXER_TIMEOUT = None INDEXER_TIMEOUT = None
SCENE_DEFAULT = None SCENE_DEFAULT = None
ANIME_DEFAULT = None ANIME_DEFAULT = None
PROVIDER_ORDER = [] PROVIDER_ORDER = None
NAMING_MULTI_EP = None NAMING_MULTI_EP = None
NAMING_PATTERN = None NAMING_PATTERN = None
@ -413,17 +413,17 @@ TIME_PRESET_W_SECONDS = None
TIMEZONE_DISPLAY = None TIMEZONE_DISPLAY = None
USE_SUBTITLES = False USE_SUBTITLES = False
SUBTITLES_LANGUAGES = [] SUBTITLES_LANGUAGES = None
SUBTITLES_DIR = '' SUBTITLES_DIR = ''
SUBTITLES_SERVICES_LIST = [] SUBTITLES_SERVICES_LIST = None
SUBTITLES_SERVICES_ENABLED = [] SUBTITLES_SERVICES_ENABLED = None
SUBTITLES_HISTORY = False SUBTITLES_HISTORY = False
SUBTITLES_FINDER_FREQUENCY = 1 SUBTITLES_FINDER_FREQUENCY = 1
USE_FAILED_DOWNLOADS = False USE_FAILED_DOWNLOADS = False
DELETE_FAILED = False DELETE_FAILED = False
EXTRA_SCRIPTS = [] EXTRA_SCRIPTS = None
GIT_PATH = None GIT_PATH = None