fix execute method name for worker rework

This commit is contained in:
Torsten Dittmann 2021-03-24 16:51:08 +01:00
parent 8dd93cc87e
commit 7641542707

View file

@ -23,15 +23,10 @@ $register->set('db', function () {
return $pdo;
});
$register->set('influxdb', function () { // Register DB connection
$host = App::getEnv('_APP_INFLUXDB_HOST', '');
$port = App::getEnv('_APP_INFLUXDB_PORT', '');
$register->set('cache', function () { // Register cache connection
$redis = new Redis();
$redis->pconnect(App::getEnv('_APP_REDIS_HOST', ''), App::getEnv('_APP_REDIS_PORT', ''));
$redis->setOption(Redis::OPT_READ_TIMEOUT, -1);
if (empty($host) || empty($port)) {
return;
}
$client = new InfluxDB\Client($host, $port, '', '', false, false, 5);
return $client;
return $redis;
});