Update Media optimize command

pull/521/head
Daniel Supernault 6 years ago
parent f69598eb1b
commit a032a31f3b
No known key found for this signature in database
GPG Key ID: 0DEF1C662C9033F7

@ -39,7 +39,7 @@ class CatchUnoptimizedMedia extends Command
*/ */
public function handle() public function handle()
{ {
$medias = Media::whereNull('processed_at')->take(50)->get(); $medias = Media::whereNotNull('status_id')->whereNull('processed_at')->take(250)->get();
foreach ($medias as $media) { foreach ($medias as $media) {
ImageOptimize::dispatch($media); ImageOptimize::dispatch($media);
} }

Loading…
Cancel
Save