mirror of
https://github.com/frappe/bench.git
synced 2024-11-12 00:06:36 +00:00
chore: rename setup_redis to skip_redis
Signed-off-by: Chinmay D. Pai <chinmaydpai@gmail.com>
This commit is contained in:
parent
4c173ded26
commit
fceb2725c4
@ -3,7 +3,7 @@ from bench.utils import find_executable
|
|||||||
from bench.app import use_rq
|
from bench.app import use_rq
|
||||||
from bench.config.common_site_config import get_config
|
from bench.config.common_site_config import get_config
|
||||||
|
|
||||||
def setup_procfile(bench_path, yes=False, setup_redis=True):
|
def setup_procfile(bench_path, yes=False, skip_redis=False):
|
||||||
config = get_config(bench_path=bench_path)
|
config = get_config(bench_path=bench_path)
|
||||||
procfile_path = os.path.join(bench_path, 'Procfile')
|
procfile_path = os.path.join(bench_path, 'Procfile')
|
||||||
if not yes and os.path.exists(procfile_path):
|
if not yes and os.path.exists(procfile_path):
|
||||||
@ -15,7 +15,7 @@ def setup_procfile(bench_path, yes=False, setup_redis=True):
|
|||||||
use_rq=use_rq(bench_path),
|
use_rq=use_rq(bench_path),
|
||||||
webserver_port=config.get('webserver_port'),
|
webserver_port=config.get('webserver_port'),
|
||||||
CI=os.environ.get('CI'),
|
CI=os.environ.get('CI'),
|
||||||
setup_redis=setup_redis)
|
skip_redis=skip_redis)
|
||||||
|
|
||||||
with open(procfile_path, 'w') as f:
|
with open(procfile_path, 'w') as f:
|
||||||
f.write(procfile)
|
f.write(procfile)
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
{% if setup_redis %}
|
{% if not skip_redis %}
|
||||||
redis_cache: redis-server config/redis_cache.conf
|
redis_cache: redis-server config/redis_cache.conf
|
||||||
redis_socketio: redis-server config/redis_socketio.conf
|
redis_socketio: redis-server config/redis_socketio.conf
|
||||||
redis_queue: redis-server config/redis_queue.conf
|
redis_queue: redis-server config/redis_queue.conf
|
||||||
|
@ -147,7 +147,7 @@ def init(path, apps_path=None, no_procfile=False, no_backups=False,
|
|||||||
redis.generate_config(path)
|
redis.generate_config(path)
|
||||||
|
|
||||||
if not no_procfile:
|
if not no_procfile:
|
||||||
setup_procfile(path, setup_redis=skip_redis_config_generation)
|
setup_procfile(path, skip_redis=skip_redis_config_generation)
|
||||||
if not no_backups:
|
if not no_backups:
|
||||||
setup_backups(bench_path=path)
|
setup_backups(bench_path=path)
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user