Optimized runner script
This commit is contained in:
@@ -64,7 +64,7 @@ class Updater(Plugin):
|
||||
return
|
||||
|
||||
log.info('Checking for new version on github for %s' % self.repo_name)
|
||||
if not Env.setting('development'):
|
||||
if not Env.get('dev'):
|
||||
self.repo.fetch()
|
||||
|
||||
current_branch = self.repo.getCurrentBranch().name
|
||||
|
||||
@@ -35,7 +35,7 @@ class CPLog(object):
|
||||
pass
|
||||
|
||||
from couchpotato.environment import Env
|
||||
if not Env.setting('development'):
|
||||
if not Env.get('dev'):
|
||||
|
||||
for replace in self.replace_private:
|
||||
msg = re.sub('(%s=)[^\&]+' % replace, '%s=xxx' % replace, msg)
|
||||
|
||||
@@ -10,7 +10,7 @@ class Automation(Plugin):
|
||||
|
||||
def __init__(self):
|
||||
|
||||
if not Env.setting('development'):
|
||||
if not Env.get('dev'):
|
||||
addEvent('app.load', self.addMovies)
|
||||
|
||||
def addMovies(self):
|
||||
|
||||
@@ -174,7 +174,7 @@ class Plugin(object):
|
||||
def getCache(self, cache_key, url = None, timeout = 300):
|
||||
cache = Env.get('cache').get(cache_key)
|
||||
if cache:
|
||||
if not Env.setting('development'): log.debug('Getting cache %s' % cache_key)
|
||||
if not Env.get('dev'): log.debug('Getting cache %s' % cache_key)
|
||||
return cache
|
||||
|
||||
if url:
|
||||
|
||||
@@ -23,7 +23,7 @@ class Manage(Plugin):
|
||||
addEvent('manage.update', self.updateLibrary)
|
||||
addApiView('manage.update', self.updateLibraryView)
|
||||
|
||||
if not Env.setting('development'):
|
||||
if not Env.get('dev'):
|
||||
addEvent('app.load', self.updateLibrary)
|
||||
|
||||
def updateLibraryView(self):
|
||||
|
||||
Reference in New Issue
Block a user