Well you can dynamically set the config on a request right? You can probably do that in a middleware or a service provider.
Note: I know that the middleware way works, but I'm not sure if the service provider way works
Here is an example for setting all the configs per user.
public function handle()
{
$users = User::all();
foreach ($users as $user) {
Config::set('horizon.environments.production.user-'. $user->id, [
'connection' => 'redis',
'queue' => ['default'],
'balance' => 'simple',
'processes' => 10,
'tries' => 3,
]);
}
}
Note that I'm not a big fan of this. Handling a queue per user sounds like a bad idea and a waste of resources. My advice would be to have a queue per domain of your site. So for example a queue for emails, a queue for processing images and a queue for the other stuff.