Skip to content

Commit

Permalink
Check collection validity
Browse files Browse the repository at this point in the history
  • Loading branch information
enjinabner committed Nov 18, 2024
1 parent dcd6953 commit 8347240
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions src/Jobs/DispatchCreateBeamClaimsJobs.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
use Illuminate\Support\Collection;
use Illuminate\Support\LazyCollection;
use Illuminate\Support\Arr;
use Illuminate\Support\Facades\Log;

class DispatchCreateBeamClaimsJobs implements ShouldQueue
{
Expand All @@ -38,6 +39,13 @@ public function __construct(
public function handle(): void
{
$beam = $this->beam->load('collection');
if (!$beam?->collection) {
Log::error('Beam collection not found', ['beam_id' => $beam->id]);

return;
}


$tokens = collect($this->tokens);

$tokens->chunk(1000)
Expand Down

0 comments on commit 8347240

Please sign in to comment.