public function cancel(Context
$context, string
$logId): void
{ $logEntity =
$this->
findLog($context,
$logId);
if ($logEntity === null
) { throw new ProcessingException('LogEntity not found'
);
} $canceledProgress =
new Progress($logId, Progress::STATE_ABORTED
);
$canceledProgress->
addProcessedRecords($logEntity->
getRecords());
$this->
saveProgress($canceledProgress);
} public function getProgress(string
$logId, int
$offset): Progress
{ $criteria =
new Criteria([$logId]);
$criteria->
addAssociation('file'
);
$current =
$this->logRepository->
search($criteria, Context::
createDefaultContext())->
first();
if (!
$current instanceof ImportExportLogEntity
) { throw new \
RuntimeException('ImportExportLog "' .
$logId . '" not found'
);
}