operationFactory = $operationFactory; $this->logger = $logger; $this->connection = $connection; } /** * @inheritDoc */ public function changeOperationStatus( $bulkUuid, $operationKey, $status, $errorCode = null, $message = null, $data = null, $resultData = null ) { try { $connection = $this->connection->getConnection(); $table = $this->connection->getTableName('magento_operation'); $bind = [ 'error_code' => $errorCode, 'status' => $status, 'result_message' => $message, 'serialized_data' => $data, 'result_serialized_data' => $resultData ]; $where = ['bulk_uuid = ?' => $bulkUuid, 'operation_key = ?' => $operationKey]; $connection->update($table, $bind, $where); } catch (\Exception $exception) { $this->logger->critical($exception->getMessage()); return false; } return true; } }