mirhendi's avatar

job_batches' doesn't exist while connection is redis!

does it neccurcy to have job_batches table while connection is redis? job_batches' doesn't exist while connection is redis! i get this error when i want to use bus facades \Illuminate\Support\Facades\Bus::batch($batch)->onConnection('redis') can i use batches without mysql table?

0 likes
4 replies
aknEvrnky's avatar

You have to use a database in order to use batches even though you use Redis. To create migration;

php artisan queue:batches-table

php artisan migrate

You can use sqlite instead of mysql if you don't use mysql and just need for batches table. Also, don't forget to add Batchable trait to your Job class.

4 likes
mirhendi's avatar

@aknEvrnky i i add this one to queue.php config and use redis ? // ADD THIS SECTION 'batching' => [ 'database' => '<custom_database>', 'table' => '<custom_job_batching>', ],

aknEvrnky's avatar

@mirhendi I didn't understand what you mean. The answer is simple: you have to use batches table, but it musn't be mysql, it can be sqlite or another db.

Please or to participate in this conversation.