Created
June 4, 2020 17:06
-
-
Save selmi-karim/18acc6f8ca4c89dcad9f0f46d847b219 to your computer and use it in GitHub Desktop.
Revisions
-
selmi-karim created this gist
Jun 4, 2020 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,9 @@ ## extend all the redis TTL keys redis-cli keys '*' | xargs -n1 -I {} /bin/bash -c 'redis-cli expire {} $(redis-cli ttl {} | xargs -I{} echo {} + EXTEND_VALUE | bc)' ## update all the redis keys with new ttl value redis-cli KEYS '*' | xargs -I{} redis-cli EXPIRE {} EXPIRE_VALUE ## get all the redis TTL keys redis-cli KEYS '*' | xargs -I{} redis-cli TTL {}