904118851 4 luni în urmă
părinte
comite
0de6448a46

+ 14 - 0
service/backmgr/processlist.lua

@@ -0,0 +1,14 @@
+--链接数
+local M = {}
+local mysqldbx = require "mysqldbx"
+local tools = require "tools"
+local skynet = require "skynet"
+local md5 =	require	"md5"
+
+function M.search(msg_body)
+    local sql = "SELECT  COUNT(*) AS total  FROM information_schema.processlist WHERE HOST LIKE '192.168.1.49%'"
+    local total = mysqldbx.query(sql)
+    return true,{},total[1].total
+end
+
+return M

+ 4 - 4
service/backmgr/video_applet_product.lua

@@ -58,7 +58,7 @@ function M.open_app_book_task(msg_body)
     for i = 1, #msg_body.id_list, 1 do
         local res,sql,id;
         id = msg_body.id_list[i]
-        sql = string.format("UPDATE  '%s' SET status = 0 ,  wait_status = 0 ,is_close_execution = 1  WHERE id = %d ",table_name,id)
+        sql = string.format("UPDATE  %s SET status = 0 ,  wait_status = 0 ,is_close_execution = 1  WHERE id = %d ",table_name,id)
         res = mysqldtaskbx.Singleton().query(sql)
     end
     return true,{}
@@ -85,7 +85,7 @@ function M.open_app_book_task(msg_body)
     for i = 1, #msg_body.id_list, 1 do
         local res,sql,id;
         id = msg_body.id_list[i]
-        sql = string.format("UPDATE  '%s' SET status = 0 ,  wait_status = 0 ,is_close_execution = 1  WHERE id = %d ",table_name,id)
+        sql = string.format("UPDATE  %s SET status = 0 ,  wait_status = 0 ,is_close_execution = 1  WHERE id = %d ",table_name,id)
         res = mysqldtaskbx.Singleton().query(sql)
     end
     return true,{}
@@ -109,7 +109,7 @@ function M.open_check_url_task(msg_body)
     end
 
     local idString = table.concat(msg_body.id_list, ",")
-    local sql = string.format("UPDATE  '%s' SET status = 0 ,  wait_status = 1   WHERE id IN (%s) ",table_name,idString)
+    local sql = string.format("UPDATE  %s SET status = 0 ,  wait_status = 1   WHERE id IN (%s) ",table_name,idString)
     skynet.error("sql:",sql)
     mysqldtaskbx.Singleton().query(sql)
     return true,{}
@@ -133,7 +133,7 @@ function M.set_task_weight(msg_body)
     end
 
     local idString = table.concat(msg_body.id_list, ",")
-    local sql = string.format("UPDATE  '%s' SET weight = %d    WHERE id IN (%s) ",table_name,msg_body.weight,idString)
+    local sql = string.format("UPDATE  %s SET weight = %d    WHERE id IN (%s) ",table_name,msg_body.weight,idString)
     skynet.error("sql:",sql)
     mysqldtaskbx.Singleton().query(sql)
     return true,{}