handle(GenerationJobs::BUILD, function (Job $job): void { $this->jobs !== null ? $this->jobs->runBuild($job) : throw new PermanentJobFailure('Semantic indexing is not enabled in this environment.'); }); $worker->handle(GenerationJobs::SYNC, function (Job $job): void { $this->jobs !== null ? $this->jobs->runSync($job) : throw new PermanentJobFailure('Semantic indexing is not enabled in this environment.'); }); } }