taskflow/tools/clear_zk.sh
melissaml e5aec26fb8 Trivial: Update pypi url to new url
Pypi url changed from [1] to [2]

[1] https://pypi.python.org/pypi/<package>
[2] https://pypi.org/project/<package>

Change-Id: I0c8a226317fa62658555cb9a18028f1516aeccfe
2018-04-21 03:43:08 +08:00

16 lines
367 B
Bash
Executable File

#!/bin/bash
# This requires https://pypi.org/project/zk_shell/ to be installed...
set -e
ZK_HOSTS=${ZK_HOSTS:-localhost:2181}
TF_PATH=${TF_PATH:-taskflow}
for path in `zk-shell --run-once "ls" $ZK_HOSTS`; do
if [[ $path == ${TF_PATH}* ]]; then
echo "Removing (recursively) path \"$path\""
zk-shell --run-once "rmr $path" $ZK_HOSTS
fi
done