option('full')) { return self::SUCCESS; } try { $result = $synchronizer->sync( (bool) $this->option('full'), $this->option('batch') === null ? null : (int) $this->option('batch'), $this->option('max-batches') === null ? null : (int) $this->option('max-batches'), ); } catch (Throwable $exception) { Log::error('钉钉应付流程镜像同步失败。', ['exception' => $exception::class]); $this->error('钉钉应付流程同步失败,已保留上一版共享数据。'); return self::FAILURE; } $this->info(sprintf( '%s:本轮 %d 批,累计处理 %d 个流程。', $result['status'] === 'succeeded' ? '同步完成' : '同步进行中', $result['batches'], $result['rows'], )); return self::SUCCESS; } }