Skip to content

Commit

Permalink
Add env var REDIS_RDB_POLICY_DISABLED
Browse files Browse the repository at this point in the history
Signed-off-by: Tony Lee <dogzzdogzz@gmail.com>
  • Loading branch information
dogzzdogzz committed Jul 18, 2023
1 parent 6309286 commit 162d316
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 12 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -406,14 +406,14 @@ redis_configure_default() {
redis_conf_set appendonly "${REDIS_AOF_ENABLED}"

#The value stored in $i here is the number of seconds and times of save rules in redis rdb mode
if [ ! -z "${REDIS_RDB_POLICY}" ]; then
if [ "${REDIS_RDB_POLICY}" == "disabled" ]; then
if is_empty_value "$REDIS_RDB_POLICY"; then
if is_boolean_yes "$REDIS_RDB_POLICY_DISABLED"; then
redis_conf_set save ""
else
for i in ${REDIS_RDB_POLICY}; do
redis_conf_set save "${i//#/ }"
done
fi
else
for i in ${REDIS_RDB_POLICY}; do
redis_conf_set save "${i//#/ }"
done
fi

redis_conf_set port "$REDIS_PORT_NUMBER"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -406,14 +406,14 @@ redis_configure_default() {
redis_conf_set appendonly "${REDIS_AOF_ENABLED}"

#The value stored in $i here is the number of seconds and times of save rules in redis rdb mode
if [ ! -z "${REDIS_RDB_POLICY}" ]; then
if [ "${REDIS_RDB_POLICY}" == "disabled" ]; then
if is_empty_value "$REDIS_RDB_POLICY"; then
if is_boolean_yes "$REDIS_RDB_POLICY_DISABLED"; then
redis_conf_set save ""
else
for i in ${REDIS_RDB_POLICY}; do
redis_conf_set save "${i//#/ }"
done
fi
else
for i in ${REDIS_RDB_POLICY}; do
redis_conf_set save "${i//#/ }"
done
fi

redis_conf_set port "$REDIS_PORT_NUMBER"
Expand Down

0 comments on commit 162d316

Please sign in to comment.