fix: fast fail of bulk importer (#1394)

* use continue instead of break

* catch additional error case

* spelling is hard
This commit is contained in:
Hayden
2022-06-15 18:19:52 -08:00
committed by GitHub
parent 525842e9a1
commit b1256f4ad2
2 changed files with 4 additions and 3 deletions

View File

@@ -77,7 +77,7 @@ class RecipeBulkScraperService(BaseService):
self.service.logger.error(f"failed to scrape url during bulk url import {b.url}")
self.service.logger.exception(e)
self._add_error_entry(f"failed to scrape url {b.url}", str(e))
break
continue
if b.tags:
recipe.tags = b.tags
@@ -90,7 +90,8 @@ class RecipeBulkScraperService(BaseService):
except Exception as e:
self.service.logger.error(f"Failed to save recipe to database during bulk url import {b.url}")
self.service.logger.exception(e)
self._add_error_entry("Failed to save recipe to database during bulk url import", str(e))
self._add_error_entry(f"Failed to save recipe to database during bulk url import {b.url}", str(e))
continue
self.report_entries.append(
ReportEntryCreate(