Ejemplo n.º 1
0
 /**
  * Execute the console command.
  *
  * @return mixed
  */
 public function fire()
 {
     $this->info('Start fetching');
     $this->user->hasDropboxToken()->hasImgurToken()->chunk(10, function ($users) {
         foreach ($users as $user) {
             $this->pushFetchImagesQueue($user);
         }
     });
     $this->info('Done');
 }
Ejemplo n.º 2
0
 /**
  * Execute the console command.
  *
  * @return mixed
  */
 public function handle()
 {
     $this->info('Start fetching');
     $this->user->hasDropboxToken()->hasImgurToken()->chunk(10, function ($users) {
         foreach ($users as $user) {
             $this->dispatch((new FetchImages($user))->onQueue('low'));
         }
     });
     $this->info('Done');
 }