Jump to content

Edit History

Kenneth Chan

Kenneth Chan

50 minutes ago, Matt75 said:

Hi,

Can you provide additional information about your issue ?

  • PrestaShop version (BO > Advanced Parameters > Information)
  • PHP version (BO > Advanced Parameters > Information)
  • MBO module version (BO > Modules > Module Manager > Search ps_mbo)
  • Screenshot or video capture of the issue
  • Additional errors logs in your FTP (PrestaShop directory > var/logs)

Thanks

I found the problem should be in ps_mbo module.

PrestaShop verison 1.7.6.4

PHP version 7.0.33

MBO version  2.0.1

I seem the error will occur on SimpleCircuitBreaker when get the $response

    public function call(
        $service,
        array $serviceParameters = [],
        callable $fallback = null
    ) {
        $transaction = $this->initTransaction($service);
        try {
            if ($this->isOpened()) {
                if (!$this->canAccessService($transaction)) {
                    return $this->callFallback($fallback);
                }

                $this->moveStateTo(State::HALF_OPEN_STATE, $service);
            }
            $response = $this->request($service, $serviceParameters);
            $this->moveStateTo(State::CLOSED_STATE, $service);

            return $response;
        } catch (UnavailableServiceException $exception) {
            $transaction->incrementFailures();
            $this->storage->saveTransaction($service, $transaction);
            if (!$this->isAllowedToRetry($transaction)) {
                $this->moveStateTo(State::OPEN_STATE, $service);

                return $this->callFallback($fallback);
            }

            return $this->call($service, $serviceParameters, $fallback);
        }
    }

 

 

Kenneth Chan

Kenneth Chan

41 minutes ago, Matt75 said:

Hi,

Can you provide additional information about your issue ?

  • PrestaShop version (BO > Advanced Parameters > Information)
  • PHP version (BO > Advanced Parameters > Information)
  • MBO module version (BO > Modules > Module Manager > Search ps_mbo)
  • Screenshot or video capture of the issue
  • Additional errors logs in your FTP (PrestaShop directory > var/logs)

Thanks

I found the problem should be in ps_mbo module.

PrestaShop verison 1.7.6.4

PHP version 7.0.33

MBO version  2.0.1

I seem the error will occur on SimpleCircuitBreaker when get the $response

    public function call(
        $service,
        array $serviceParameters = [],
        callable $fallback = null
    ) {
        $transaction = $this->initTransaction($service);
        try {
            if ($this->isOpened()) {
                if (!$this->canAccessService($transaction)) {
                    die('abcdef');
                    return $this->callFallback($fallback);
                }

                $this->moveStateTo(State::HALF_OPEN_STATE, $service);
            }
            $response = $this->request($service, $serviceParameters);
            $this->moveStateTo(State::CLOSED_STATE, $service);

            return $response;
        } catch (UnavailableServiceException $exception) {
            $transaction->incrementFailures();
            $this->storage->saveTransaction($service, $transaction);
            if (!$this->isAllowedToRetry($transaction)) {
                $this->moveStateTo(State::OPEN_STATE, $service);

                return $this->callFallback($fallback);
            }

            return $this->call($service, $serviceParameters, $fallback);
        }
    }

 

 

×
×
  • Create New...