mirror of
https://github.com/omnivore-app/omnivore.git
synced 2026-03-11 08:54:26 +00:00
Merge pull request #3182 from omnivore-app/fix/importer-notification
This commit is contained in:
commit
d09ec51136
1 changed files with 3 additions and 1 deletions
|
|
@ -446,6 +446,7 @@ async function fetchContent(req, res) {
|
|||
} catch (e) {
|
||||
logRecord.error = e.message;
|
||||
console.error(`Error while retrieving page`, logRecord);
|
||||
statusCode = 500;
|
||||
|
||||
// fallback to scrapingbee for non pdf content
|
||||
if (url && contentType !== 'application/pdf') {
|
||||
|
|
@ -456,6 +457,7 @@ async function fetchContent(req, res) {
|
|||
content = sbResult.domContent;
|
||||
title = sbResult.title;
|
||||
logRecord.fetchContentTime = Date.now() - fetchStartTime;
|
||||
statusCode = 200;
|
||||
}
|
||||
} finally {
|
||||
// close browser context if it was opened
|
||||
|
|
@ -507,7 +509,7 @@ async function fetchContent(req, res) {
|
|||
// mark import failed on the last failed retry
|
||||
const retryCount = req.headers['x-cloudtasks-taskretrycount'];
|
||||
if (retryCount == MAX_RETRY_COUNT) {
|
||||
console.debug('max retry count reached');
|
||||
console.info('max retry count reached');
|
||||
importStatus = importStatus || 'failed';
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue