-
Notifications
You must be signed in to change notification settings - Fork 2
Open
Description
il faudrait catch les RejectedItemException, ajouter un log, et laisser passer la pipeline.
j'ai essayé:
# src/PipelineRunner.php
public function run(
\Iterator $source,
\Generator $coroutine,
RejectionInterface $rejection,
StateInterface $state,
): \Iterator {
$state->initialize();
$rejection->initialize();
$wrapper = new GeneratorWrapper();
$wrapper->rewind($source, $coroutine);
while ($wrapper->valid($source)) {
try {
$bucket = $coroutine->send($source->current());
} catch (RejectedItemException $exception) {
$rejection->reject($source->current());
$state->reject();
$this->logger->log(
$this->rejectionLevel,
'Some data was rejected from the pipeline',
[
'line' => $source->current(),
'exception' => $exception,
]
);
}
if (null === $bucket) {
break;
}
mais ca ne marche pas.
Metadata
Metadata
Assignees
Labels
No labels