Commit d0b03056 authored by luhongguang's avatar luhongguang

Merge branch 'colonel' into test

parents 15b38fc0 28f63cc5
...@@ -7,7 +7,7 @@ ...@@ -7,7 +7,7 @@
"php": "7.2.*", "php": "7.2.*",
"ext-json": "*", "ext-json": "*",
"api/php_utils":"1.0.17", "api/php_utils":"1.0.17",
"api/php_services":"1.0.13", "api/php_services":"1.0.14",
"ext-openssl": "*" "ext-openssl": "*"
}, },
"minimum-stability": "dev", "minimum-stability": "dev",
......
...@@ -4,15 +4,15 @@ ...@@ -4,15 +4,15 @@
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies",
"This file is @generated automatically" "This file is @generated automatically"
], ],
"content-hash": "2ccd591433ba03459f132b1bc9aef07c", "content-hash": "6b8ea7dcd025a3916d9804461968836b",
"packages": [ "packages": [
{ {
"name": "api/php_services", "name": "api/php_services",
"version": "v1.0.13", "version": "1.0.14",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://git.yidian-inc.com:8021/bp/php_services.git", "url": "https://git.yidian-inc.com:8021/bp/php_services.git",
"reference": "c51c248e6e7aba33fd147993b5f61f140ccd56ca" "reference": "f2ba54cfaff45ffa8c0c4864f3b4935e1fcb3cfa"
}, },
"require": { "require": {
"endroid/qr-code": "^3.9", "endroid/qr-code": "^3.9",
...@@ -26,7 +26,7 @@ ...@@ -26,7 +26,7 @@
} }
}, },
"description": "bp api php_services", "description": "bp api php_services",
"time": "2021-09-02T06:50:55+00:00" "time": "2021-09-08T06:38:07+00:00"
}, },
{ {
"name": "api/php_utils", "name": "api/php_utils",
......
...@@ -37,8 +37,17 @@ class JwUser ...@@ -37,8 +37,17 @@ class JwUser
} }
$params = ["mobilePhone" => $params['mobile']]; $params = ["mobilePhone" => $params['mobile']];
//$user_info = (new TimeOut())->runGet($url, $params); $begin = microtime(true);
$user_info = (new Request())->get($url, $params); $user_info = (new Request())->get($url, $params);
$end = microtime(true);
$total_time = round(($end - $begin), 4) * 1000;
if (!empty($user_info['response'])) {
$code = $user_info['response']['code'];
} else {
$code = -1;
}
$env = \Yaf\Application::app()->environ() ?? "test";
MonUtil::proxyMon($url, $code, 'jw_user_'.$env, $total_time);
FileLog::info('jw_user_getUserInfo', json_encode($user_info)); FileLog::info('jw_user_getUserInfo', json_encode($user_info));
if (!$user_info) { if (!$user_info) {
throw new CodeSpecialException("timeout"); throw new CodeSpecialException("timeout");
...@@ -61,7 +70,6 @@ class JwUser ...@@ -61,7 +70,6 @@ class JwUser
} }
$params = ["userId" => $params['user_id']]; $params = ["userId" => $params['user_id']];
//$user_info = (new TimeOut())->runPost($url, $params);
$begin = microtime(true); $begin = microtime(true);
$user_info = (new Request())->post($url, $params); $user_info = (new Request())->post($url, $params);
$end = microtime(true); $end = microtime(true);
...@@ -71,7 +79,9 @@ class JwUser ...@@ -71,7 +79,9 @@ class JwUser
} else { } else {
$code = -1; $code = -1;
} }
MonUtil::proxyMon($url, $code, 'jw_user', $total_time);
$env = \Yaf\Application::app()->environ() ?? "test";
MonUtil::proxyMon($url, $code, 'jw_user_'.$env, $total_time);
FileLog::info('jw_user_getUserByUserId', json_encode($user_info)); FileLog::info('jw_user_getUserByUserId', json_encode($user_info));
if (!$user_info) { if (!$user_info) {
throw new CodeSpecialException("timeout"); throw new CodeSpecialException("timeout");
...@@ -91,8 +101,17 @@ class JwUser ...@@ -91,8 +101,17 @@ class JwUser
} }
$params = ["userIds" => $params['user_id']]; $params = ["userIds" => $params['user_id']];
//$user_info = (new TimeOut())->runPost($url, $params); $begin = microtime(true);
$user_info = (new Request())->post($url, $params, 0, '', '', 0, true, 'jw_user'); $user_info = (new Request())->post($url, $params);
$end = microtime(true);
$total_time = round(($end - $begin), 4) * 1000;
if (!empty($user_info['response'])) {
$code = $user_info['response']['code'];
} else {
$code = -1;
}
$env = \Yaf\Application::app()->environ() ?? "test";
MonUtil::proxyMon($url, $code, 'jw_user_'.$env, $total_time);
FileLog::info('jw_user_getUserList', json_encode($user_info)); FileLog::info('jw_user_getUserList', json_encode($user_info));
if (!$user_info) { if (!$user_info) {
throw new CodeSpecialException("timeout"); throw new CodeSpecialException("timeout");
...@@ -139,7 +158,17 @@ class JwUser ...@@ -139,7 +158,17 @@ class JwUser
throw new CodeSpecialException("failed"); throw new CodeSpecialException("failed");
} }
//$pushToken = (new TimeOut())->runPost($url, $params); //$pushToken = (new TimeOut())->runPost($url, $params);
$pushToken = (new Request())->post($url, $params, 0, '', '', 0, true, 'jw_user'); $begin = microtime(true);
$pushToken = (new Request())->post($url, $params);
$end = microtime(true);
$total_time = round(($end - $begin), 4) * 1000;
if (!empty($pushToken['response'])) {
$code = $pushToken['response']['code'];
} else {
$code = -1;
}
$env = \Yaf\Application::app()->environ() ?? "test";
MonUtil::proxyMon($url, $code, 'jw_user_'.$env, $total_time);
FileLog::info('jw_user_savePushToken', json_encode($pushToken)); FileLog::info('jw_user_savePushToken', json_encode($pushToken));
if (!$pushToken) { if (!$pushToken) {
throw new CodeSpecialException("timeout"); throw new CodeSpecialException("timeout");
...@@ -163,8 +192,17 @@ class JwUser ...@@ -163,8 +192,17 @@ class JwUser
} }
$params = ["userIds" => $params['user_id']]; $params = ["userIds" => $params['user_id']];
//$list = (new TimeOut())->runPost($url, $params); $begin = microtime(true);
$list = (new Request())->post($url, $params, 0, '', '', 0, true, 'jw_user'); $list = (new Request())->post($url, $params);
$end = microtime(true);
$total_time = round(($end - $begin), 4) * 1000;
if (!empty($list['response'])) {
$code = $list['response']['code'];
} else {
$code = -1;
}
$env = \Yaf\Application::app()->environ() ?? "test";
MonUtil::proxyMon($url, $code, 'jw_user_'.$env, $total_time);
FileLog::info('jw_user_getUserListWithDynamic', json_encode($list)); FileLog::info('jw_user_getUserListWithDynamic', json_encode($list));
if (!$list) { if (!$list) {
throw new CodeSpecialException("timeout"); throw new CodeSpecialException("timeout");
...@@ -188,8 +226,17 @@ class JwUser ...@@ -188,8 +226,17 @@ class JwUser
} }
$params = ["userId" => $params['user_id']]; $params = ["userId" => $params['user_id']];
//$list = (new TimeOut())->runPost($url, $params); $begin = microtime(true);
$list = (new Request())->post($url, $params, 0, '', '', 0, true, 'jw_user'); $list = (new Request())->post($url, $params);
$end = microtime(true);
$total_time = round(($end - $begin), 4) * 1000;
if (!empty($list['response'])) {
$code = $list['response']['code'];
} else {
$code = -1;
}
$env = \Yaf\Application::app()->environ() ?? "test";
MonUtil::proxyMon($url, $code, 'jw_user_'.$env, $total_time);
FileLog::info('jw_user_getUserDigg', json_encode($list)); FileLog::info('jw_user_getUserDigg', json_encode($list));
if (!$list) { if (!$list) {
throw new CodeSpecialException("timeout"); throw new CodeSpecialException("timeout");
...@@ -206,8 +253,17 @@ class JwUser ...@@ -206,8 +253,17 @@ class JwUser
if (!$url) { if (!$url) {
throw new CodeSpecialException("failed"); throw new CodeSpecialException("failed");
} }
//$ret = (new TimeOut())->runPost($url, $params); $begin = microtime(true);
$ret = (new Request())->post($url, $params, 0, '', '', 0, true, 'jw_user'); $ret = (new Request())->post($url, $params);
$end = microtime(true);
$total_time = round(($end - $begin), 4) * 1000;
if (!empty($ret['response'])) {
$code = $ret['response']['code'];
} else {
$code = -1;
}
$env = \Yaf\Application::app()->environ() ?? "test";
MonUtil::proxyMon($url, $code, 'jw_user_'.$env, $total_time);
FileLog::info('jw_user_saveUpdateLife', json_encode($ret)); FileLog::info('jw_user_saveUpdateLife', json_encode($ret));
if (!$ret) { if (!$ret) {
throw new CodeSpecialException("timeout"); throw new CodeSpecialException("timeout");
...@@ -224,8 +280,17 @@ class JwUser ...@@ -224,8 +280,17 @@ class JwUser
if (!$url) { if (!$url) {
throw new CodeSpecialException("failed"); throw new CodeSpecialException("failed");
} }
//$ret = (new TimeOut())->runPost($url, $params); $begin = microtime(true);
$ret = (new Request())->post($url, $params, 0, '', '', 0, true, 'jw_user'); $ret = (new Request())->post($url, $params);
$end = microtime(true);
$total_time = round(($end - $begin), 4) * 1000;
if (!empty($ret['response'])) {
$code = $ret['response']['code'];
} else {
$code = -1;
}
$env = \Yaf\Application::app()->environ() ?? "test";
MonUtil::proxyMon($url, $code, 'jw_user_'.$env, $total_time);
FileLog::info('getWechatOpenid', json_encode($ret)); FileLog::info('getWechatOpenid', json_encode($ret));
if (!$ret) { if (!$ret) {
throw new CodeSpecialException("timeout"); throw new CodeSpecialException("timeout");
...@@ -243,8 +308,17 @@ class JwUser ...@@ -243,8 +308,17 @@ class JwUser
if (!$url) { if (!$url) {
throw new CodeSpecialException("failed"); throw new CodeSpecialException("failed");
} }
//$ret = (new TimeOut())->runPost($url, $params); $begin = microtime(true);
$ret = (new Request())->post($url, $params, 0, '', '', 0, true, 'jw_user'); $ret = (new Request())->post($url, $params);
$end = microtime(true);
$total_time = round(($end - $begin), 4) * 1000;
if (!empty($ret['response'])) {
$code = $ret['response']['code'];
} else {
$code = -1;
}
$env = \Yaf\Application::app()->environ() ?? "test";
MonUtil::proxyMon($url, $code, 'jw_user_'.$env, $total_time);
FileLog::info('getWechatOpenid', json_encode($ret)); FileLog::info('getWechatOpenid', json_encode($ret));
if (!$ret) { if (!$ret) {
throw new CodeSpecialException("timeout"); throw new CodeSpecialException("timeout");
......
...@@ -32,19 +32,19 @@ private static $installed = array ( ...@@ -32,19 +32,19 @@ private static $installed = array (
'aliases' => 'aliases' =>
array ( array (
), ),
'reference' => '64abe898e25ed52e044b6cc7ed9adef399d0239b', 'reference' => '8f346c81d3f2e7e81c7870acbece3051b1016b7e',
'name' => 'yidian/yaf_demo', 'name' => 'yidian/yaf_demo',
), ),
'versions' => 'versions' =>
array ( array (
'api/php_services' => 'api/php_services' =>
array ( array (
'pretty_version' => 'v1.0.13', 'pretty_version' => '1.0.14',
'version' => '1.0.13.0', 'version' => '1.0.14.0',
'aliases' => 'aliases' =>
array ( array (
), ),
'reference' => 'c51c248e6e7aba33fd147993b5f61f140ccd56ca', 'reference' => 'f2ba54cfaff45ffa8c0c4864f3b4935e1fcb3cfa',
), ),
'api/php_utils' => 'api/php_utils' =>
array ( array (
...@@ -332,7 +332,7 @@ private static $installed = array ( ...@@ -332,7 +332,7 @@ private static $installed = array (
'aliases' => 'aliases' =>
array ( array (
), ),
'reference' => '64abe898e25ed52e044b6cc7ed9adef399d0239b', 'reference' => '8f346c81d3f2e7e81c7870acbece3051b1016b7e',
), ),
), ),
); );
......
...@@ -2,19 +2,19 @@ ...@@ -2,19 +2,19 @@
"packages": [ "packages": [
{ {
"name": "api/php_services", "name": "api/php_services",
"version": "v1.0.13", "version": "1.0.14",
"version_normalized": "1.0.13.0", "version_normalized": "1.0.14.0",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://git.yidian-inc.com:8021/bp/php_services.git", "url": "https://git.yidian-inc.com:8021/bp/php_services.git",
"reference": "c51c248e6e7aba33fd147993b5f61f140ccd56ca" "reference": "f2ba54cfaff45ffa8c0c4864f3b4935e1fcb3cfa"
}, },
"require": { "require": {
"endroid/qr-code": "^3.9", "endroid/qr-code": "^3.9",
"perftools/php-profiler": "^0.18.0", "perftools/php-profiler": "^0.18.0",
"php": "7.2.*" "php": "7.2.*"
}, },
"time": "2021-09-02T06:50:55+00:00", "time": "2021-09-08T06:38:07+00:00",
"type": "library", "type": "library",
"installation-source": "source", "installation-source": "source",
"autoload": { "autoload": {
......
...@@ -6,19 +6,19 @@ ...@@ -6,19 +6,19 @@
'aliases' => 'aliases' =>
array ( array (
), ),
'reference' => '64abe898e25ed52e044b6cc7ed9adef399d0239b', 'reference' => '8f346c81d3f2e7e81c7870acbece3051b1016b7e',
'name' => 'yidian/yaf_demo', 'name' => 'yidian/yaf_demo',
), ),
'versions' => 'versions' =>
array ( array (
'api/php_services' => 'api/php_services' =>
array ( array (
'pretty_version' => 'v1.0.13', 'pretty_version' => '1.0.14',
'version' => '1.0.13.0', 'version' => '1.0.14.0',
'aliases' => 'aliases' =>
array ( array (
), ),
'reference' => 'c51c248e6e7aba33fd147993b5f61f140ccd56ca', 'reference' => 'f2ba54cfaff45ffa8c0c4864f3b4935e1fcb3cfa',
), ),
'api/php_utils' => 'api/php_utils' =>
array ( array (
...@@ -306,7 +306,7 @@ ...@@ -306,7 +306,7 @@
'aliases' => 'aliases' =>
array ( array (
), ),
'reference' => '64abe898e25ed52e044b6cc7ed9adef399d0239b', 'reference' => '8f346c81d3f2e7e81c7870acbece3051b1016b7e',
), ),
), ),
); );
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