remove until loop
This commit is contained in:
parent
f2827470be
commit
bfff245079
|
@ -9,16 +9,9 @@ UserInput() {
|
|||
|
||||
ExecutePurge() {
|
||||
echo 'Purging remote media, please wait.'
|
||||
UntilLoop "https://$1/_synapse/admin/v1/purge_media_cache?before_ts=$2&access_token=$3" "error"
|
||||
echo 'Error encountered. Please try again.'
|
||||
curl -X POST "https://$1/_synapse/admin/v1/purge_media_cache?before_ts=$2&access_token=$3" --data '{}'
|
||||
}
|
||||
|
||||
UntilLoop() {
|
||||
until curl -X POST "$1" --data '{}' \
|
||||
grep -m 1 "$2"; do
|
||||
sleep 1
|
||||
done
|
||||
}
|
||||
|
||||
UnixTimeMs() {
|
||||
unix_time_ms="$(($(date -d "$1" +'%s') * 1000))"
|
||||
|
|
Loading…
Reference in New Issue