feat: finalizing Scraping endpoint
This commit is contained in:
parent
0374ab0e46
commit
073439163b
@@ -10,11 +10,15 @@ class InMemoryScraperAdapter implements ScraperInterface
|
||||
{
|
||||
private ?\Exception $shouldThrowException = null;
|
||||
|
||||
public function scrape(ScrapingJob $job): void
|
||||
public function scrape(ScrapingJob $job): ScrapingJob
|
||||
{
|
||||
if ($this->shouldThrowException) {
|
||||
throw $this->shouldThrowException;
|
||||
$job->fail($this->shouldThrowException->getMessage());
|
||||
return $job;
|
||||
}
|
||||
|
||||
$job->complete();
|
||||
return $job;
|
||||
}
|
||||
|
||||
public function simulateError(\Exception $exception): void
|
||||
|
||||
Reference in New Issue
Block a user