我可以从控制器分派我的工作。 但是,当我尝试从php artisan tinker调度时,它给了我错误。 可能是什么问题?
注意:我只使用redis :: funnel,当我从控制器分派作业时,它的功能很好。
这是我得到的错误
Psy Shell v0.9.6 (PHP 7.2.5-1+ubuntu16.04.1+deb.sury.org+1 — cli) by Justin Hileman
>>> dispatch(new \App\Jobs\someJob(2600))->onQueue('P-4')
=> Illuminate\Foundation\Bus\PendingDispatch {#3168}
>>> dispatch(new \App\Jobs\someJob(2600))->onQueue('P-4')
Predis/ClientException with message 'Command 'iNCR' is not a registered Redis command.'
>>> dispatch(new \App\Jobs\someJob(2600))->onQueue('P-4')
=> Illuminate\Foundation\Bus\PendingDispatch {#3181}
>>> dispatch(new \App\Jobs\someJob(2600))->onQueue('P-4')
Predis/ClientException with message 'Command 'iNCR' is not a registered Redis command.'
PHP Fatal error: Uncaught Predis\ClientException: Command 'iNCR' is not a registered Redis command. in /home/forge/mydomain.com/vendor/predis/predis/src/Profile/RedisProfile.php:88
Stack trace:
#0 /home/forge/mydomain.com/vendor/predis/predis/src/Client.php(323): Predis\Profile\RedisProfile->createCommand('iNCR', Array)
#1 /home/forge/mydomain.com/vendor/predis/predis/src/Client.php(314): Predis\Client->createCommand('incr', Array)
#2 /home/forge/mydomain.com/vendor/laravel/framework/src/Illuminate/Redis/Connections/Connection.php(96): Predis\Client->__call('incr', Array)
#3 /home/forge/mydomain.com/vendor/laravel/framework/src/Illuminate/Redis/Connections/Connection.php(108): Illuminate\Redis\Connections\Connection->command('incr', Array)
#4 /home/forge/mydomain.com/vendor/laravel/horizon/src/Repositories/RedisJobRepository.php(65): Illuminate\Redis\Connections\Connection->__call('incr', Array)
#5 /home/forge/mydomain.com/vendor/laravel/horizon/src/JobId.php(27): Laravel\Horizon\Repositories\Redis in /home/forge/mydomain.com/vendor/predis/predis/src/Profile/RedisProfile.php on line 88