Skip to content

Commit

Permalink
fix: referendum job (#82)
Browse files Browse the repository at this point in the history
  • Loading branch information
andreiio authored Nov 24, 2024
1 parent c9871df commit 384645e
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,7 @@ public function execute(): void

Bus::batch([new ImportTurnoutsJob($this->scheduledJob, County::find(403))])
->catch($persistAndClean)
->then($persistAndClean)
->then(fn () => UpdateElectionTurnoutsTimestamp::dispatch($electionId))
->name("$electionName / Prezență / $time")
->allowFailures()
Expand Down
5 changes: 5 additions & 0 deletions app/Jobs/SchedulableJob.php
Original file line number Diff line number Diff line change
Expand Up @@ -42,4 +42,9 @@ final public function handle(): void

$this->scheduledJob->touch('last_run_at');
}

public function uniqueId(): string
{
return "scheduled-job:{$this->scheduledJob->id}";
}
}

0 comments on commit 384645e

Please sign in to comment.