@siggi This might help you:
In your ReportExportNew class:
class ReportExportNew
{
use InteractsWithQueue;
public $jobId;
// Other properties/methods...
public function queue($queue, $command)
{
$this->jobId = $this->job->getJobId();
$queue->push($command);
}
}
Now call this way:
$job = new ReportExportNew(auth()->user()->id, $serializedQuery, $isAdmin);
dispatch($job);
$jobId = $job->jobId;
$this->generateLockFile($jobId);