mirror of
https://github.com/dgtlmoon/changedetection.io.git
synced 2025-11-30 13:23:28 +00:00
Restock detection - Better reporting when it fails (#1584)
This commit is contained in:
@@ -5,7 +5,7 @@ import time
|
||||
|
||||
from changedetectionio import content_fetcher
|
||||
from .processors.text_json_diff import FilterNotFoundInResponse
|
||||
|
||||
from .processors.restock_diff import UnableToExtractRestockData
|
||||
|
||||
# A single update worker
|
||||
#
|
||||
@@ -319,6 +319,11 @@ class update_worker(threading.Thread):
|
||||
'last_check_status': e.status_code,
|
||||
'has_ldjson_price_data': None})
|
||||
process_changedetection_results = False
|
||||
except UnableToExtractRestockData as e:
|
||||
# Usually when fetcher.instock_data returns empty
|
||||
self.app.logger.error("Exception reached processing watch UUID: %s - %s", uuid, str(e))
|
||||
self.datastore.update_watch(uuid=uuid, update_obj={'last_error': f"Unable to extract restock data for this page unfortunately. (Got code {e.status_code} from server)"})
|
||||
process_changedetection_results = False
|
||||
except Exception as e:
|
||||
self.app.logger.error("Exception reached processing watch UUID: %s - %s", uuid, str(e))
|
||||
self.datastore.update_watch(uuid=uuid, update_obj={'last_error': str(e)})
|
||||
|
||||
Reference in New Issue
Block a user