I have a package that helps to control job processing. It uses model with hyn/multi-tenant.
When running Job it throws exception Database connection [tenant] not configured.
It throws error only when i connect package by composer require. If i try to connect package using psr-4 autoload everything works fine!
I assume that queue worker isn't connecting Service Providers as needed.
Here is the part where exception is thrown
public function getProcess($job)
{
$job = CompositeProcessHelpers::getJob($job);
if ($id = $this->getProcessId($job)) {
return CompositeProcess::query()->whereKey($id)->first();
}
return null;
}
Does anybody know how laravel's queue worker registers service provider or how to solve this issue?