|
|
@@ -112,6 +112,9 @@ class PreparePerfCalc {
|
|
|
}
|
|
|
$this->_errors = [];
|
|
|
$this->_handleUserId = $handleUserId;
|
|
|
+ if (empty($periodNum)) {
|
|
|
+ echo('定时器执行预业绩计算 ,内存使用:' . (round(memory_get_usage() / 1024 / 1024, 3)) . 'MB' . PHP_EOL);
|
|
|
+ }
|
|
|
$this->_updatePercent(5);
|
|
|
$t1 = microtime(true);
|
|
|
// 初始化结算任务
|
|
|
@@ -127,7 +130,7 @@ class PreparePerfCalc {
|
|
|
$this->clearTableData();
|
|
|
$this->_updatePercent(15);
|
|
|
$t2 = microtime(true);
|
|
|
- echo('初始化、清空缓存及相关数据表完成,耗时:' . round($t2 - $t1, 3) . ',内存使用:' . (round(memory_get_usage() / 1024 / 1024, 3)) . 'MB' . PHP_EOL);
|
|
|
+ echo(date('Y-m-d H:i:s',time()).'初始化、清空缓存及相关数据表完成,耗时:' . round($t2 - $t1, 3) . ',内存使用:' . (round(memory_get_usage() / 1024 / 1024, 3)) . 'MB' . PHP_EOL);
|
|
|
// 计算月奖,才需要向缓存中加入按推荐深度的所有用户
|
|
|
//修改每一期都缓存所有用户
|
|
|
PrepareCalcCache::addUsers($this->_periodNum);
|
|
|
@@ -179,7 +182,7 @@ class PreparePerfCalc {
|
|
|
$this->errorCalcTask();
|
|
|
file_put_contents('error_test.txt', var_export([
|
|
|
'err' => $e->getMessage()
|
|
|
- ],true));
|
|
|
+ ],true),FILE_APPEND);
|
|
|
$this->addError('calc', $e->getMessage());
|
|
|
return false;
|
|
|
}
|