// +---------------------------------------------------------------------- declare (strict_types=1); namespace app\command; use crmeb\jobs\SyncProductTopJob; use think\console\Command; use think\console\Input; use think\console\Output; use think\facade\Queue; class changeHotTop extends Command { protected function configure() { // 指令配置 $this->setName('change:hotTop') ->setDescription('清楚缓存:php think change:hotTop'); } /** * 队列执行 * @param Input $input * @param Output $output * @return int|void|null * @author Qinii * @day 4/24/22 */ protected function execute(Input $input, Output $output) { Queue::push(SyncProductTopJob::class,[]); $output->writeln('开始执行队列'); } }