*/ public array $backoff = [10, 60]; public function __construct(public Media $media) {} /** * @return array */ public function middleware(): array { // The safety-net command and an upload can easily land on the same // file at once, and both would be writing the same derived paths. return [(new WithoutOverlapping("media:{$this->media->id}"))->dontRelease()]; } public function handle(ImageProcessor $processor): void { $processor->process($this->media); } }