From 082bc95faf530f44fbdd84600b14c97e25707748 Mon Sep 17 00:00:00 2001 From: gau1991 Date: Thu, 9 Jul 2015 11:58:35 +0530 Subject: [PATCH] Changed --redis to --wpredis --- ee/cli/plugins/site.py | 38 ++++++++++++++++---------------- ee/cli/plugins/site_functions.py | 6 ++--- 2 files changed, 22 insertions(+), 22 deletions(-) diff --git a/ee/cli/plugins/site.py b/ee/cli/plugins/site.py index c28902af..81440535 100644 --- a/ee/cli/plugins/site.py +++ b/ee/cli/plugins/site.py @@ -347,7 +347,7 @@ class EESiteCreateController(CementBaseController): (['--wpsc'], dict(help="create wordpress single/multi site with wpsc cache", action='store_true')), - (['--redis'], + (['--wpredis'], dict(help="create wordpress single/multi site with redis cache", action='store_true')), (['--hhvm'], @@ -444,7 +444,7 @@ class EESiteCreateController(CementBaseController): data = dict(site_name=ee_domain, www_domain=ee_www_domain, static=False, basic=True, wp=False, w3tc=False, - wpfc=False, wpsc=False, redis=False, multisite=False, + wpfc=False, wpsc=False, wpredis=False, multisite=False, wpsubdir=False, webroot=ee_site_webroot, ee_db_name='', ee_db_user='', ee_db_pass='', ee_db_host='') @@ -515,7 +515,7 @@ class EESiteCreateController(CementBaseController): data['pagespeed'] = False pagespeed = 0 - if (cache == 'redis' and (not self.app.pargs.experimental)): + if (cache == 'wpredis' and (not self.app.pargs.experimental)): Log.info(self, "Redis is experimental feature and it may not" "work with all CSS/JS/Cache of your site.\nYou can " "disable it by changing cache later.\nDo you wish" @@ -526,9 +526,9 @@ class EESiteCreateController(CementBaseController): if check_prompt != "Y" and check_prompt != "y": Log.info(self, "Not using Redis for site.") cache = 'basic' - data['redis'] = False + data['wpredis'] = False data['basic'] = True - self.app.pargs.redis = False + self.app.pargs.wpredis = False # self.app.args.print_help() # if not data: @@ -751,7 +751,7 @@ class EESiteUpdateController(CementBaseController): dict(help="update to wpfc cache", action='store_true')), (['--wpsc'], dict(help="update to wpsc cache", action='store_true')), - (['--redis'], + (['--wpredis'], dict(help="update to redis cache", action='store_true')), (['--hhvm'], dict(help='Use HHVM for site', @@ -780,7 +780,7 @@ class EESiteUpdateController(CementBaseController): if not (pargs.php or pargs.mysql or pargs.wp or pargs.wpsubdir or pargs.wpsubdomain or pargs.w3tc or pargs.wpfc or - pargs.wpsc or pargs.hhvm or pargs.pagespeed or pargs.redis): + pargs.wpsc or pargs.hhvm or pargs.pagespeed or pargs.wpredis): Log.error(self, "Please provide options to update sites.") if pargs.all: @@ -900,7 +900,7 @@ class EESiteUpdateController(CementBaseController): if stype == 'php': data = dict(site_name=ee_domain, www_domain=ee_www_domain, static=False, basic=True, wp=False, w3tc=False, - wpfc=False, wpsc=False, redis=False, multisite=False, + wpfc=False, wpsc=False, wpredis=False, multisite=False, wpsubdir=False, webroot=ee_site_webroot, currsitetype=oldsitetype, currcachetype=oldcachetype) @@ -908,7 +908,7 @@ class EESiteUpdateController(CementBaseController): data = dict(site_name=ee_domain, www_domain=ee_www_domain, static=False, basic=True, wp=False, w3tc=False, - wpfc=False, wpsc=False, redis=False, multisite=False, + wpfc=False, wpsc=False, wpredis=False, multisite=False, wpsubdir=False, webroot=ee_site_webroot, ee_db_name='', ee_db_user='', ee_db_pass='', ee_db_host='', @@ -963,31 +963,31 @@ class EESiteUpdateController(CementBaseController): data['w3tc'] = False data['wpfc'] = False data['wpsc'] = False - data['redis'] = False + data['wpredis'] = False elif oldcachetype == 'w3tc': data['basic'] = False data['w3tc'] = True data['wpfc'] = False data['wpsc'] = False - data['redis'] = False + data['wpredis'] = False elif oldcachetype == 'wpfc': data['basic'] = False data['w3tc'] = False data['wpfc'] = True data['wpsc'] = False - data['redis'] = False + data['wpredis'] = False elif oldcachetype == 'wpsc': data['basic'] = False data['w3tc'] = False data['wpfc'] = False data['wpsc'] = True - data['redis'] = False - elif oldcachetype == 'redis': + data['wpredis'] = False + elif oldcachetype == 'wpredis': data['basic'] = False data['w3tc'] = False data['wpfc'] = False data['wpsc'] = False - data['redis'] = True + data['wpredis'] = True if pargs.hhvm != 'off': data['hhvm'] = True @@ -1081,7 +1081,7 @@ class EESiteUpdateController(CementBaseController): data['pagespeed'] = True pagespeed = True - if data['currcachetype'] != 'redis' and pargs.redis: + if data['currcachetype'] != 'wpredis' and pargs.wpredis: if (not pargs.experimental): Log.info(self, "Redis is experimental feature and it may not" " work with all plugins of your site.\nYou can " @@ -1092,7 +1092,7 @@ class EESiteUpdateController(CementBaseController): check_prompt = input("Type \"y\" to continue [n]:") if check_prompt != "Y" and check_prompt != "y": Log.info(self, "Not using Redis for site") - data['redis'] = False + data['wpredis'] = False data['basic'] = True cache = 'basic' @@ -1234,7 +1234,7 @@ class EESiteUpdateController(CementBaseController): " `tail /var/log/ee/ee.log` & Try Again!!!") return 1 - if oldcachetype == 'redis' and not data['redis']: + if oldcachetype == 'wpredis' and not data['wpredis']: try: uninstallwp_plugin(self, 'redis-cache', data) except SiteError as e: @@ -1265,7 +1265,7 @@ class EESiteUpdateController(CementBaseController): "`tail /var/log/ee/ee.log` & Try Again!!!") return 1 - if oldcachetype != 'redis' and data['redis']: + if oldcachetype != 'wpredis' and data['wpredis']: try: installwp_plugin(self, 'redis-cache', data) except SiteError as e: diff --git a/ee/cli/plugins/site_functions.py b/ee/cli/plugins/site_functions.py index 03a02ad6..a38d74ad 100644 --- a/ee/cli/plugins/site_functions.py +++ b/ee/cli/plugins/site_functions.py @@ -450,7 +450,7 @@ def setupwordpress(self, data): installwp_plugin(self, 'wp-super-cache', data) """Install Redis Cache""" - if data['redis']: + if data['wpredis']: installwp_plugin(self, 'redis-cache', data) """Install W3 Total Cache""" @@ -622,7 +622,7 @@ def site_package_check(self, stype): "wp-cli-{0}.phar" .format(EEVariables.ee_wp_cli), "/usr/bin/wp", "WP-CLI"]] - if self.app.pargs.redis: + if self.app.pargs.wpredis: Log.debug(self, "Setting apt_packages variable for redis") if not EEAptGet.is_installed(self, 'redis-server'): apt_packages = apt_packages + EEVariables.ee_redis @@ -873,7 +873,7 @@ def detSitePar(opts): if val and key in ['html', 'php', 'mysql', 'wp', 'wpsubdir', 'wpsubdomain']: typelist.append(key) - elif val and key in ['wpfc', 'wpsc', 'w3tc', 'redis']: + elif val and key in ['wpfc', 'wpsc', 'w3tc', 'wpredis']: cachelist.append(key) if len(typelist) > 1 or len(cachelist) > 1: