@ -5,7 +5,7 @@ import time
from changedetectionio import content_fetcher
from changedetectionio import content_fetcher
from . processors . text_json_diff import FilterNotFoundInResponse
from . processors . text_json_diff import FilterNotFoundInResponse
from . processors . restock_diff import UnableToExtractRestockData
# A single update worker
# A single update worker
#
#
@ -319,6 +319,11 @@ class update_worker(threading.Thread):
' last_check_status ' : e . status_code ,
' last_check_status ' : e . status_code ,
' has_ldjson_price_data ' : None } )
' has_ldjson_price_data ' : None } )
process_changedetection_results = False
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 :
except Exception as e :
self . app . logger . error ( " Exception reached processing watch UUID: %s - %s " , uuid , str ( 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 ) } )
self . datastore . update_watch ( uuid = uuid , update_obj = { ' last_error ' : str ( e ) } )