From 764154270719956759576badcf202a23c2355140 Mon Sep 17 00:00:00 2001 From: Torsten Dittmann Date: Wed, 24 Mar 2021 16:51:08 +0100 Subject: [PATCH] fix execute method name for worker rework --- app/workers.php | 15 +++++---------- 1 file changed, 5 insertions(+), 10 deletions(-) diff --git a/app/workers.php b/app/workers.php index a0df772da5..ff5ba1dbd3 100644 --- a/app/workers.php +++ b/app/workers.php @@ -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; }); \ No newline at end of file