lock('work-order-waybill-lookup:backfill', 3600); if (! $lock->get()) { $this->info('已有运单索引任务运行,本轮跳过。'); return self::SUCCESS; } try { $result = $lookup->backfill((int) $this->option('batch'), max(0, (int) $this->option('max-batches')), max(0, (int) $this->option('pause-ms'))); $this->info(json_encode($result)); return self::SUCCESS; } finally { $lock->release(); } } }