public function execute() { $series = $this->series->orderBy('updated_at', 'asc')->take(10)->get(); $this->log("Updating videos of " . $series->count() . " series."); $series->each(function ($model) { $data = collect(['config' => ['mode' => 'update'], 'series' => $model]); $this->dispatch(new Asyncify($data, $this->getPipeline())); }); }
public function update() { $playlists = Series::orderBy('updated_at', 'asc')->take(5)->get(); $this->getContent($playlists); print "Content updated!"; }