I am trying to update a database row within a queued job which works when my queue connection is set to sync
but now when it's set to database
.
Edit: Fixed Serialization issue, update db in queue issue still persists.
public function handle()
{
$id = $this->settings->id;
$server = $this->settings->server;
$number = $this->settings->number;
$api_script = storage_path('script.py');
$delay = 5;
//Determine Delay
//Process Script Here
//Check If Script Successful
DB::table('orders')->where('order_id', $this->settings->order_id)->update(['status' => "Finalising..."]);
ProcessEmails::dispatch($this->settings)->delay(now()->addMinutes($delay));
// echo $process->getOutput();
}
Above is the job that I want to execute, the update database command works in sync but not when the connection is set to database.
Thanks for your help!