From 015a9d7b4cc461d5356333b79fc34d31aff4d276 Mon Sep 17 00:00:00 2001 From: dp-ifacesoft Date: Mon, 24 Aug 2020 17:08:37 +0300 Subject: [PATCH 1/3] info job --- source/Ice/Core/Action/Worker.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/Ice/Core/Action/Worker.php b/source/Ice/Core/Action/Worker.php index 8cb84323..c500af52 100644 --- a/source/Ice/Core/Action/Worker.php +++ b/source/Ice/Core/Action/Worker.php @@ -190,7 +190,7 @@ private function dispatch(array $dispatchWorker, array $params) $taskLog = Type_String::printR($task, false); - Logger::log(get_class($this) . ' (' . $i . '/' . $dispatchWorker['tasks'] . ') #' . $hash . ' ' . $taskLog . ' left: ' . $leftTime, 'job'); + Logger::log('[ '. $i . '/' . $dispatchWorker['tasks'] .' : ' . ($dispatchWorker['tasks'] - $i) . ' ] #' . $hash .' ' . $taskLog . ' [left: ' . $leftTime . ']', get_class($this)); $class::call(['workerKey' => $workerKey, 'hash' => $hash, 'task' => $taskLog], 0, $bg); } catch (\Exception $e) { $this->getLogger()->error(['Worker {$0}: Task #{$1} failed - {$2}', [get_class($this), $hash, Type_String::printR($task)]], __FILE__, __LINE__, $e); From 18d5152268e5ecc2303bdc76ce16abd499fc1296 Mon Sep 17 00:00:00 2001 From: dp-ifacesoft Date: Fri, 28 Aug 2020 10:57:29 +0300 Subject: [PATCH 2/3] fixes --- source/Ice/Core/Logger.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/source/Ice/Core/Logger.php b/source/Ice/Core/Logger.php index 0d01f51b..c4cbb307 100644 --- a/source/Ice/Core/Logger.php +++ b/source/Ice/Core/Logger.php @@ -156,7 +156,7 @@ private function __construct($class) */ public static function init() { - self::$reserveMemory = str_repeat('#', pow(2, 20)); + self::$reserveMemory = str_repeat('#', pow(2, 25)); if (Environment::getInstance()->isProduction()) { error_reporting(E_ALL & ~E_STRICT & ~E_NOTICE & ~E_USER_NOTICE & ~E_DEPRECATED & ~E_USER_DEPRECATED); @@ -167,6 +167,7 @@ public static function init() error_reporting(E_ALL & ~E_DEPRECATED & ~E_USER_DEPRECATED); // Оставить только E_ALL ini_set('display_errors', 1); + ini_set('display_startup_errors', 1); ini_set('xdebug.var_display_max_depth', -1); ini_set('xdebug.profiler_enable', 1); @@ -185,6 +186,7 @@ public static function init() public static function shutdownHandler() { self::$reserveMemory = null; +// gc_collect_cycles(); //todo: Response output mast by here if ($error = error_get_last()) { From 8e4efa545b7347b6eb418262ef665f7624471218 Mon Sep 17 00:00:00 2001 From: dp-ifacesoft Date: Wed, 2 Sep 2020 16:08:11 +0300 Subject: [PATCH 3/3] func isUse --- source/Ice/Core/QueryBuilder.php | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/source/Ice/Core/QueryBuilder.php b/source/Ice/Core/QueryBuilder.php index b6579043..1a7a9425 100644 --- a/source/Ice/Core/QueryBuilder.php +++ b/source/Ice/Core/QueryBuilder.php @@ -2419,13 +2419,17 @@ public function getWidgets() * @param $funcName * @param $argumentString * @param array $modelTableData + * @param bool $isUse * @return $this * @throws Exception - * * @todo feature using: ->func('fieldAlias', 'funcName', 'funcArgument', $modelTableData) */ - public function func($funcName, $argumentString, $modelTableData = []) + public function func($funcName, $argumentString, $modelTableData = [], $isUse = true) { + if (!$isUse) { + return $this; + } + /** * @var Model $modelClass */