This commit is contained in:
@ -15,6 +15,7 @@ declare(strict_types=1);
|
||||
|
||||
namespace App\Job;
|
||||
|
||||
use App\Context\ApiUrlContext;
|
||||
use App\Context\QueueContext;
|
||||
use App\Log\Log;
|
||||
use Exception;
|
||||
@ -45,8 +46,8 @@ abstract class BaseJob extends Job
|
||||
QueueContext::setUser($user);
|
||||
}
|
||||
|
||||
if (!empty($company = $this->data['company'])) {
|
||||
QueueContext::setCompanyInfo($company);
|
||||
if (!empty($this->data['api_url'])) {
|
||||
ApiUrlContext::setApiUrl($this->data['api_url']);
|
||||
}
|
||||
|
||||
// 运行业务逻辑, 总是在事务中执行,保证事务的原子性
|
||||
|
Reference in New Issue
Block a user