各位使用队列遇到过吗? 默认监听可以工作 但是总抛异常?求指教 调试信息正文
我是打算用队列来异步发邮件的,邮件可以发,只是shell不停的抛出异常,略微不爽。
我视图自行追踪代码,但是无奈laravel的代码很复杂,暂时无果。
调试信息如下,求指教
commnd:
php artisan queue:listen
exception:
[ErrorException]
Undefined index: job
Stack trace:
#0 /mnt/hgfs/web/icd/vendor/laravel/framework/src/Illuminate/Queue/Jobs/Job.php(125): Illuminate\Foundation\Bootstrap\HandleExceptions->handleError(8, 'Undefined index...', '/mnt/hgfs/web/i...', 125, Array)
#1 /mnt/hgfs/web/icd/vendor/laravel/framework/src/Illuminate/Queue/Jobs/RedisJob.php(50): Illuminate\Queue\Jobs\Job->resolveAndFire(Array)
#2 /mnt/hgfs/web/icd/vendor/laravel/framework/src/Illuminate/Queue/Worker.php(202): Illuminate\Queue\Jobs\RedisJob->fire()
#3 /mnt/hgfs/web/icd/vendor/laravel/framework/src/Illuminate/Queue/Worker.php(153): Illuminate\Queue\Worker->process('redis', Object(Illuminate\Queue\Jobs\RedisJob), '0', '0')
#4 /mnt/hgfs/web/icd/vendor/laravel/framework/src/Illuminate/Queue/Console/WorkCommand.php(109): Illuminate\Queue\Worker->pop(NULL, 'default', '0', '3', '0')
#5 /mnt/hgfs/web/icd/vendor/laravel/framework/src/Illuminate/Queue/Console/WorkCommand.php(71): Illuminate\Queue\Console\WorkCommand->runWorker(NULL, 'default', '0', '128', false)
#6 [internal function]: Illuminate\Queue\Console\WorkCommand->fire()
#7 /mnt/hgfs/web/icd/vendor/laravel/framework/src/Illuminate/Container/Container.php(502): call_user_func_array(Array, Array)
#8 /mnt/hgfs/web/icd/vendor/laravel/framework/src/Illuminate/Console/Command.php(149): Illuminate\Container\Container->call(Array)
#9 /mnt/hgfs/web/icd/vendor/symfony/console/Command/Command.php(259): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#10 /mnt/hgfs/web/icd/vendor/laravel/framework/src/Illuminate/Console/Command.php(135): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#11 /mnt/hgfs/web/icd/vendor/symfony/console/Application.php(878): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#12 /mnt/hgfs/web/icd/vendor/symfony/console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(Illuminate\Queue\Console\WorkCommand), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#13 /mnt/hgfs/web/icd/vendor/symfony/console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#14 /mnt/hgfs/web/icd/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(98): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#15 /mnt/hgfs/web/icd/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#16 {main}`
我视图自行追踪代码,但是无奈laravel的代码很复杂,暂时无果。
调试信息如下,求指教
commnd:
php artisan queue:listen
exception:
[ErrorException]
Undefined index: job
Stack trace:
#0 /mnt/hgfs/web/icd/vendor/laravel/framework/src/Illuminate/Queue/Jobs/Job.php(125): Illuminate\Foundation\Bootstrap\HandleExceptions->handleError(8, 'Undefined index...', '/mnt/hgfs/web/i...', 125, Array)
#1 /mnt/hgfs/web/icd/vendor/laravel/framework/src/Illuminate/Queue/Jobs/RedisJob.php(50): Illuminate\Queue\Jobs\Job->resolveAndFire(Array)
#2 /mnt/hgfs/web/icd/vendor/laravel/framework/src/Illuminate/Queue/Worker.php(202): Illuminate\Queue\Jobs\RedisJob->fire()
#3 /mnt/hgfs/web/icd/vendor/laravel/framework/src/Illuminate/Queue/Worker.php(153): Illuminate\Queue\Worker->process('redis', Object(Illuminate\Queue\Jobs\RedisJob), '0', '0')
#4 /mnt/hgfs/web/icd/vendor/laravel/framework/src/Illuminate/Queue/Console/WorkCommand.php(109): Illuminate\Queue\Worker->pop(NULL, 'default', '0', '3', '0')
#5 /mnt/hgfs/web/icd/vendor/laravel/framework/src/Illuminate/Queue/Console/WorkCommand.php(71): Illuminate\Queue\Console\WorkCommand->runWorker(NULL, 'default', '0', '128', false)
#6 [internal function]: Illuminate\Queue\Console\WorkCommand->fire()
#7 /mnt/hgfs/web/icd/vendor/laravel/framework/src/Illuminate/Container/Container.php(502): call_user_func_array(Array, Array)
#8 /mnt/hgfs/web/icd/vendor/laravel/framework/src/Illuminate/Console/Command.php(149): Illuminate\Container\Container->call(Array)
#9 /mnt/hgfs/web/icd/vendor/symfony/console/Command/Command.php(259): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#10 /mnt/hgfs/web/icd/vendor/laravel/framework/src/Illuminate/Console/Command.php(135): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#11 /mnt/hgfs/web/icd/vendor/symfony/console/Application.php(878): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#12 /mnt/hgfs/web/icd/vendor/symfony/console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(Illuminate\Queue\Console\WorkCommand), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#13 /mnt/hgfs/web/icd/vendor/symfony/console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#14 /mnt/hgfs/web/icd/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(98): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#15 /mnt/hgfs/web/icd/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#16 {main}`
0 个回复