<?php
namespace App\Jobs;use App\Models\Payout;use Illuminate\Bus\Queueable;use Illuminate\Contracts\Queue\ShouldQueue;use Illuminate\Foundation\Bus\Dispatchable;use Illuminate\Queue\InteractsWithQueue;use Illuminate\Queue\SerializesModels;
final class SyncOpenPayoutsJob implements ShouldQueue {use Dispatchable,InteractsWithQueue,Queueable,SerializesModels;public function __construct(){$this->onQueue('payouts');}public function handle():void{Payout::whereIn('status',['broadcasting','confirming'])->chunkById(100,fn($rows)=>$rows->each(fn($p)=>SyncPayoutJob::dispatch($p->id)->onQueue('payouts')));}}
