info(" [*] Waiting for {$queue}. To exit press CTRL+C"); Mq::worker($exchange,$queue,function ($message){ $ok1 = $this->call('upgrade:progress',['--book'=>$message->book, '--para'=>$message->para, '--channel'=>$message->channel, ]); $ok2 = $this->call('upgrade:progress.chapter',['--book'=>$message->book, '--para'=>$message->para, '--channel'=>$message->channel, ]); $this->info("Received book=".$message->book.' progress='.$ok1.' chapter='.$ok2); return $ok1+$ok2; }); return 0; } }