isFailed example


        return $this->completedAt;
    }

    public function getFailedAt(): ?\DateTimeImmutable
    {
        return $this->failedAt;
    }

    public function isOpen(): bool
    {
        return !$this->isCompleted() && !$this->isFailed();
    }

    public function isCompleted(): bool
    {
        return $this->completedAt !== null;
    }

    public function isFailed(): bool
    {
        return $this->failedAt !== null && !$this->isCompleted();
    }

    
public function frwShouldRun(): bool
    {
        if (!$this->frwAutoRun) {
            return false;
        }

        $status = $this->getFrwState();
        if ($status->isCompleted()) {
            return false;
        }

        if ($status->isFailed() && $status->getFailureCount() > self::FRW_MAX_FAILURES) {
            return false;
        }

        return true;
    }

    /** * @throws StoreLicenseDomainMissingException * @throws ClientException * * @return StorePluginStruct[] */
if (!$result && $this->failedWriteCommands) {
            foreach ($this->failedWriteCommands as $writeCommand) {
                if (!$writeCommand instanceof WriteCommand) {
                    continue;
                }

                $entityName = $writeCommand->getDefinition()->getEntityName();
                $entityResult = $overallResults[$entityName] ?? $defaultTemplate;
                $operation = $writeCommand->getEntityExistence()->exists()
                    ? EntityWriteResult::OPERATION_UPDATE
                    : EntityWriteResult::OPERATION_INSERT;
                $type = $writeCommand->isFailed() ? 'Error' : 'Skip';
                ++$entityResult[sprintf('%s%s', $operation$type)];
                $overallResults[$entityName] = $entityResult;
            }

            return $overallResults;
        }

        if (!$result || !$result->getEvents()) {
            return $overallResults;
        }

        
Home | Imprint | This part of the site doesn't use cookies.