Queue command with direct redis access so it's faster

This commit is contained in:
Juan Pablo Vial
2025-05-16 13:56:32 -04:00
parent f47f86dd2b
commit 8ba54fd3ad
6 changed files with 103 additions and 18 deletions

View File

@ -4,7 +4,7 @@ use Psr\Container\ContainerInterface;
return [
Psr\Log\LoggerInterface::class => function(ContainerInterface $container) {
$minLogLevel = Monolog\Level::Debug;
if ($container->has('DEBUG') and !$container->get('DEBUG')) {
if ($container->has('DEBUG') and $container->get('DEBUG') === 'false') {
$minLogLevel = Monolog\Level::Warning;
}
$handlers = [];

View File

@ -0,0 +1,19 @@
<?php
use Psr\Container\ContainerInterface;
return [
Predis\ClientInterface::class => function(ContainerInterface $container) {
$options = [
'scheme' => 'tcp',
'host' => $container->get('REDIS_HOST'),
'port' => $container->get('REDIS_PORT')
];
if ($container->has('REDIS_USER')) {
$options['username'] = $container->get('REDIS_USER');
}
if ($container->has('REDIS_PASSWORD')) {
$options['password'] = $container->get('REDIS_PASSWORD');
}
return new Predis\Client($options);
},
];