Merge branch 'hotfix/queue_login' of wmtx/sdk into master

添加限流日志
master
廖金灵 5 years ago committed by Gogs
commit c5ce04ccdd

@ -34,6 +34,7 @@ class UserController extends BaseController
{
$count = Redis::incr(Redis::KEY_LOGIN_LIMIT);
if ($count >= 300) {
Log::write('login_limit:' . date('Y-m-d H:i:s') . ' ---- ' . $count, 'INFO', '', C('LOG_PATH')."login_limit.log");
Redis::decr(Redis::KEY_LOGIN_LIMIT);
$this->set_message(1001, "fail", "登录人数过多,请稍后再试!");
}

Loading…
Cancel
Save