/** * Execute all items in the work queue in a single transaction */ private function flushMulti() { $this->clientCmd('pipeline', function ($pipe) { /* @var Pipeline $pipe */ while ($command = $this->unit_of_work->getWork()) { $pipe->executeCommand($this->getPredisCommand($command)); } }); }
/** * Execute the current unit of work * * @return void */ public function flush() { while ($work = $this->unit_of_work->getWork()) { $this->worker_pool->execute($work); } }