You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I was working on a feature that includes batch of jobs on a multi tenant software where all jobs are dispatched on landlord connection/db.
I was blindly trying to set batching connection for my batch through 'connection' param under batching in config/queue.php , however it was still using tenant connection and failing to add the jobs ..
After debugging through internals of laravel , I noticed the param name was actually 'database' which is used to set connection to use for batches which I found a bit inconsistent and misleading compared to the rest of similar config.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
I was working on a feature that includes batch of jobs on a multi tenant software where all jobs are dispatched on landlord connection/db.
I was blindly trying to set batching connection for my batch through 'connection' param under batching in config/queue.php , however it was still using tenant connection and failing to add the jobs ..
After debugging through internals of laravel , I noticed the param name was actually 'database' which is used to set connection to use for batches which I found a bit inconsistent and misleading compared to the rest of similar config.
Note
Same appllies for failed_jobs config as well
My suggestion is to rename the config param to connection for both batching and job_failed in config/queue.php instead of misleading database
Beta Was this translation helpful? Give feedback.
All reactions