Explorar o código

Update media:optimize command

Daniel Supernault %!s(int64=4) %!d(string=hai) anos
pai
achega
21837be99f
Modificáronse 1 ficheiros con 2 adicións e 0 borrados
  1. 2 0
      app/Console/Commands/CatchUnoptimizedMedia.php

+ 2 - 0
app/Console/Commands/CatchUnoptimizedMedia.php

@@ -42,9 +42,11 @@ class CatchUnoptimizedMedia extends Command
     {
         DB::transaction(function() {
             Media::whereNull('processed_at')
+                ->where('skip_optimize', '!=', true)
                 ->whereNull('remote_url')
                 ->whereNotNull('status_id')
                 ->whereNotNull('media_path')
+                ->where('created_at', '>', now()->subHours(1))
                 ->whereIn('mime', [
                     'image/jpeg',
                     'image/png',