Commit c06bf6ed79d16f0248a80c54987b59aef61b5864

Authored by zhouhaihai
1 parent 3f604f2e

增加log 服务数量

Showing 3 changed files with 3 additions and 2 deletions   Show diff stats
@@ -131,6 +131,7 @@ end @@ -131,6 +131,7 @@ end
131 -- 登录成功开始任务 131 -- 登录成功开始任务
132 function CMD.task() 132 function CMD.task()
133 heartBeat() 133 heartBeat()
  134 + skynet.sleep(math.randInt(100, 1000))
134 startUnit() 135 startUnit()
135 end 136 end
136 137
@@ -23,7 +23,7 @@ skynet.start(function() @@ -23,7 +23,7 @@ skynet.start(function()
23 23
24 --启动log 24 --启动log
25 if use_logd == 1 then 25 if use_logd == 1 then
26 - for i = 1, work_count do 26 + for i = 1, work_count * 2 do
27 local logd = skynet.newservice("services/logd", i) 27 local logd = skynet.newservice("services/logd", i)
28 skynet.call(logd, "lua", "open") 28 skynet.call(logd, "lua", "open")
29 end 29 end
src/shared/logproxy.lua
1 1
2 local skynet = require "skynet" 2 local skynet = require "skynet"
3 -local logd_count = tonumber(skynet.getenv("thread")) 3 +local logd_count = tonumber(skynet.getenv("thread")) * 2
4 local use_logd = tonumber(skynet.getenv("logd")) 4 local use_logd = tonumber(skynet.getenv("logd"))
5 5
6 6