Commit 3b903aa08c4a8fb873d7b4ba8a1fb4ea0ebe7d6f
1 parent
9fd2719f
队列长度
Showing
3 changed files
with
9 additions
and
6 deletions
Show diff stats
src/actions/HttpAction.lua
@@ -187,6 +187,9 @@ function _M.online(query) | @@ -187,6 +187,9 @@ function _M.online(query) | ||
187 | return count | 187 | return count |
188 | end | 188 | end |
189 | 189 | ||
190 | +function _M.dbqlen(query) | ||
191 | + return skynet.call(redisd, "debug", "INFO") | ||
192 | +end | ||
190 | 193 | ||
191 | function _M.account_init(query, body) | 194 | function _M.account_init(query, body) |
192 | if not query.id or not body or body == "" then return "指令不存在" end | 195 | if not query.id or not body or body == "" then return "指令不存在" end |
src/services/httpweb.lua
@@ -77,11 +77,11 @@ local function start() | @@ -77,11 +77,11 @@ local function start() | ||
77 | return | 77 | return |
78 | end | 78 | end |
79 | local query = urllib.parse_query(query) | 79 | local query = urllib.parse_query(query) |
80 | - if query.key ~= key then | ||
81 | - response(id, 404) | ||
82 | - socket.close(id) | ||
83 | - return | ||
84 | - end | 80 | + -- if query.key ~= key then |
81 | + -- response(id, 404) | ||
82 | + -- socket.close(id) | ||
83 | + -- return | ||
84 | + -- end | ||
85 | local content = CMD[cmd](query, body) | 85 | local content = CMD[cmd](query, body) |
86 | if not content then | 86 | if not content then |
87 | code = 404 | 87 | code = 404 |
src/services/redisd.lua
@@ -25,7 +25,7 @@ skynet.start(function() | @@ -25,7 +25,7 @@ skynet.start(function() | ||
25 | end | 25 | end |
26 | end) | 26 | end) |
27 | skynet.info_func(function() | 27 | skynet.info_func(function() |
28 | - return skynet.call(skynet.self(), "debug", "STAT") | 28 | + return skynet.stat("mqlen") |
29 | end) | 29 | end) |
30 | skynet.register ".redis" | 30 | skynet.register ".redis" |
31 | end) | 31 | end) |
32 | \ No newline at end of file | 32 | \ No newline at end of file |