From 90c2ae6d426fb6653f12a6137b3c1c8751c86e15 Mon Sep 17 00:00:00 2001 From: guochunyang Date: Tue, 3 Jan 2017 19:24:42 +0800 Subject: [PATCH 1/4] modify redis sock conf --- README.md | 2 +- utils/conf/default.conf | 2 +- utils/conf/redis.conf | 2 +- utils/conf/vhost.conf | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 15da272..7fef180 100644 --- a/README.md +++ b/README.md @@ -72,7 +72,7 @@ repo中的`utils/conf`文件夹中有灰度系统部署所需的最小示例 ```bash 1. git clone https://github.com/SinaMSRE/ABTestingGateway -2. cd /path/to/ABTestingGateway/utils +2. cd /path/to/ABTestingGateway/utils && mkdir logs # 启动redis数据库 3. redis-server conf/redis.conf diff --git a/utils/conf/default.conf b/utils/conf/default.conf index 1fc91bc..6de632a 100644 --- a/utils/conf/default.conf +++ b/utils/conf/default.conf @@ -21,7 +21,7 @@ server { set $redis_host '127.0.0.1'; set $redis_port '6379'; - set $redis_uds '/tmp/redis.sock'; + set $redis_uds '/var/run/redis.sock'; set $redis_connect_timeout 10000; set $redis_dbid 0; diff --git a/utils/conf/redis.conf b/utils/conf/redis.conf index 4b99b22..f8154ab 100644 --- a/utils/conf/redis.conf +++ b/utils/conf/redis.conf @@ -33,7 +33,7 @@ port 6379 # incoming connections. There is no default, so Redis will not listen # on a unix socket when not specified. # -unixsocket /tmp/redis.sock +unixsocket /var/run/redis.sock unixsocketperm 766 # Close the connection after a client is idle for N seconds (0 to disable) diff --git a/utils/conf/vhost.conf b/utils/conf/vhost.conf index 564b41d..8868bf1 100644 --- a/utils/conf/vhost.conf +++ b/utils/conf/vhost.conf @@ -17,7 +17,7 @@ server { set $redis_host '127.0.0.1'; set $redis_port '6379'; - set $redis_uds '/tmp/redis.sock'; + set $redis_uds '/var/run/redis.sock'; set $redis_connect_timeout 10000; set $redis_dbid 0; set $redis_pool_size 1000; From e87e6e1d1d18cb13b31f182b3d76ad67927be50f Mon Sep 17 00:00:00 2001 From: brandon Date: Mon, 6 Mar 2017 17:34:21 +0800 Subject: [PATCH 2/4] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 7fef180..c416fa0 100644 --- a/README.md +++ b/README.md @@ -60,7 +60,7 @@ Features: * lua-cjson * redis -> > 注意:建议选用openresty最新版,但是从openresty-1.9.15.1开始,lua-resty-core有些api变更,因此建议先使用openresty-1.9.7.5及以下,原因是:[必读](https://github.com/CNSRE/ABTestingGateway/issues/27#issuecomment-236149255) +> > 注意:建议选用openresty最新版,但是从openresty-1.9.15.1开始,lua-resty-core有些api变更,因此建议先使用openresty-1.9.7.5,原因是:[必读](https://github.com/CNSRE/ABTestingGateway/issues/27#issuecomment-236149255) > > 注意:tengine用户仍然可以使用本项目,只需要从openresty软件包中获取最新的ngx_lua、LuaJIT以及lua-cjson等,并注意:[必读](https://github.com/CNSRE/ABTestingGateway/issues/27#issuecomment-236149255) From 75bd80cb8f830b76631e269cbaa70c327c973f71 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=9B=9E=E7=9C=B8=2C=E5=A2=83=E7=95=8C?= <1162223173@qq.com> Date: Fri, 20 Jul 2018 13:06:19 +0800 Subject: [PATCH 3/4] =?UTF-8?q?=E6=89=B9=E9=87=8F=E6=9D=80=E6=AD=BBnginx?= =?UTF-8?q?=E8=BF=9B=E7=A8=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 测试demo批量杀死nginx进程,方便 --- utils/stop-all-nginx.sh | 8 ++++++++ 1 file changed, 8 insertions(+) create mode 100644 utils/stop-all-nginx.sh diff --git a/utils/stop-all-nginx.sh b/utils/stop-all-nginx.sh new file mode 100644 index 0000000..f2e3133 --- /dev/null +++ b/utils/stop-all-nginx.sh @@ -0,0 +1,8 @@ +rm *temp -rf + +/usr/local/nginx/sbin/nginx -p `pwd` -c conf/nginx.conf -s stop +/usr/local/nginx/sbin/nginx -p `pwd` -c conf/stable.conf -s stop +/usr/local/nginx/sbin/nginx -p `pwd` -c conf/beta1.conf -s stop +/usr/local/nginx/sbin/nginx -p `pwd` -c conf/beta2.conf -s stop +/usr/local/nginx/sbin/nginx -p `pwd` -c conf/beta3.conf -s stop +/usr/local/nginx/sbin/nginx -p `pwd` -c conf/beta4.conf -s stop From 834e8afe99fcf20b20e48829527cf7f0130fb879 Mon Sep 17 00:00:00 2001 From: zhendong Date: Sun, 14 Oct 2018 15:04:30 +0800 Subject: [PATCH 4/4] [bugfix] find key by prefix, append ':' into prefix --- lib/abtesting/adapter/policy.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/abtesting/adapter/policy.lua b/lib/abtesting/adapter/policy.lua index b3333a1..1325535 100644 --- a/lib/abtesting/adapter/policy.lua +++ b/lib/abtesting/adapter/policy.lua @@ -106,7 +106,7 @@ _M.del = function(self, id) local database = self.database local baseLibrary = self.baseLibrary - local policyLib = baseLibrary .. ':' .. id + local policyLib = baseLibrary .. ':' .. id .. ':' local keys, err = database:keys(policyLib..'*') if not keys then