mirror of
https://github.com/ail-project/ail-framework.git
synced 2024-11-10 00:28:22 +00:00
fix: [reset_AIL] fix #368
This commit is contained in:
parent
de57f9b9e7
commit
21e099a6d6
1 changed files with 16 additions and 1 deletions
17
reset_AIL.sh
17
reset_AIL.sh
|
@ -80,6 +80,20 @@ function soft_reset {
|
|||
exit
|
||||
}
|
||||
|
||||
function flush_DB_keep_user {
|
||||
pushd redis/src
|
||||
./redis-cli -p 6382 -n 1 FLUSHDB;
|
||||
./redis-cli -p 6382 -n 2 FLUSHDB;
|
||||
./redis-cli -p 6382 -n 3 FLUSHDB;
|
||||
./redis-cli -p 6382 -n 4 FLUSHDB;
|
||||
./redis-cli -p 6382 -n 5 FLUSHDB;
|
||||
./redis-cli -p 6382 -n 6 FLUSHDB;
|
||||
./redis-cli -p 6382 -n 7 FLUSHDB;
|
||||
./redis-cli -p 6382 -n 8 FLUSHDB;
|
||||
./redis-cli -p 6382 -n 9 FLUSHDB;
|
||||
popd
|
||||
}
|
||||
|
||||
#If no params,
|
||||
[[ $@ ]] || {
|
||||
# Make sure the reseting is intentional
|
||||
|
@ -120,7 +134,8 @@ function soft_reset {
|
|||
while [ "$1" != "" ]; do
|
||||
case $1 in
|
||||
--softReset ) soft_reset;
|
||||
;;
|
||||
flush_DB_keep_user;
|
||||
;;
|
||||
* ) exit 1
|
||||
esac
|
||||
shift
|
||||
|
|
Loading…
Reference in a new issue