gremlin 1 年之前
父节点
当前提交
37fab8a1ed
共有 1 个文件被更改,包括 18 次插入0 次删除
  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
+
+