Commit 14f9221a authored by christ's avatar christ

logs

parent 046f2cbb
...@@ -44,7 +44,7 @@ class clinNginxLogsIndex extends basecli ...@@ -44,7 +44,7 @@ class clinNginxLogsIndex extends basecli
} }
} }
public function getIndex($dayOption){ public function getIndex($dayOption){
$dateStr=date('Y-m-d',strtotime($dayOption)); $dateStr=date('Y.m.d',strtotime($dayOption));
$indexStr=\Our\Common::format("nignx-log-".$dateStr); $indexStr=\Our\Common::format("nignx-log-".$dateStr);
return $indexStr; return $indexStr;
} }
......
...@@ -272,6 +272,9 @@ $tcp_server->on('receive', function($serv, $fd, $from_id, $data) use($conf) { ...@@ -272,6 +272,9 @@ $tcp_server->on('receive', function($serv, $fd, $from_id, $data) use($conf) {
$data['data']['message']=unserialize($data['data']['message']); $data['data']['message']=unserialize($data['data']['message']);
$redis->hIncrBy(KEY_PRE.$data['data']['toId'],'unread_message_count',\Our\ApiConst::one); $redis->hIncrBy(KEY_PRE.$data['data']['toId'],'unread_message_count',\Our\ApiConst::one);
if(!empty($sendFd)){ if(!empty($sendFd)){
if(!$data['data']['message']){
$data['data']['message']=new \stdClass();
}
$serv->push($sendFd, responseJson($sendFd,"fromMsg","success", $data['data'])); $serv->push($sendFd, responseJson($sendFd,"fromMsg","success", $data['data']));
$redis->hSet(KEY_PRE.$data['data']['fromId'],'sendTime', time()); $redis->hSet(KEY_PRE.$data['data']['fromId'],'sendTime', time());
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment