gremlin il y a 1 an
Parent
commit
37fab8a1ed
1 fichiers modifiés avec 18 ajouts et 0 suppressions
  1. 18 0
      redis-upload-local.sh

+ 18 - 0
redis-upload-local.sh

@@ -0,0 +1,18 @@
+#!/bin/bash
+git pull
+
+#redis-cli -h empire -n 7 -x SET httpscanvasinstructurecom-32990000000000049 < httpscanvasinstructurecom-32990000000000049.json 
+#redis-cli -h empire -n 7  EXPIRE httpscanvasinstructurecom-32990000000000049 60 > /dev/null 2&>1
+
+redishost=empire
+redisdb=7
+redistimeout=600
+
+for file in *\.json; do 
+  f=$(echo "$file" | cut -f 1 -d '.')
+  redis-cli -h $redishost -n $redisdb -x SET $f < $file > /dev/null 2>&1
+  redis-cli -h $redishost -n $redisdb  EXPIRE $f $redistimeout > /dev/null 2>&1
+  echo  "Uploaded $f"; 
+done
+
+