- improved "Redis" cache handler. Switched to persistent connection

- improved "Redis" info panels on `/setup` page, added "connected clients" and "blocked clients" data
- improved DB connection. Switched to persistent connection (configurable in `pathfinder.ini`)
- fixed some PHP errors after "Cortex" upgrade
This commit is contained in:
Mark Friedrich
2019-03-24 15:42:49 +01:00
parent af59235b73
commit 66e843a479
16 changed files with 82 additions and 30 deletions

View File

@@ -76,9 +76,10 @@ class Setup extends Controller\Controller {
$buildInfo = $controller->setupCategory($categoryId, $offset, $length);
$categoryUniverseModel = Model\Universe\BasicUniverseModel::getNew('CategoryModel');
$categoryUniverseModel->getById($categoryId, 0);
$return->countAll = (int)$f3->get('REQUIREMENTS.DATA.STRUCTURES');
$return->countBuild = array_reduce($buildInfo, $sum, 0);
$return->countBuildAll = $categoryUniverseModel->getById($categoryId, 0)->getTypesCount(false);
$return->countBuildAll = $categoryUniverseModel->getTypesCount(false);
$return->progress = $percent($return->countAll, $return->countBuildAll);
break;
case 'Ships':
@@ -88,9 +89,10 @@ class Setup extends Controller\Controller {
$buildInfo = $controller->setupCategory($categoryId, $offset, $length);
$categoryUniverseModel = Model\Universe\BasicUniverseModel::getNew('CategoryModel');
$categoryUniverseModel->getById($categoryId, 0);
$return->countAll = (int)$f3->get('REQUIREMENTS.DATA.SHIPS');
$return->countBuild = array_reduce($buildInfo, $sum, 0);
$return->countBuildAll = $categoryUniverseModel->getById($categoryId, 0)->getTypesCount(false);
$return->countBuildAll = $categoryUniverseModel->getTypesCount(false);
$return->progress = $percent($return->countAll, $return->countBuildAll);
break;
case 'SystemNeighbour':