getModelType($this->argument('type')); if ($this->option('scanned')) { $class::whereNotNull('scanned') ->update(['scanned'=>NULL]); } $c = 0; $class::NotScanned()->each(function ($item) use ($c) { if ($item->remove) { Log::warning(sprintf('Not scanning [%s], marked for removal',$item->id)); return; } $this->dispatch((new CatalogScan($item))->onQueue('scan')); $c++; }); Log::info(sprintf('Processed [%s]',$c)); } }