mirror of
https://github.com/khoaliber/khoj.git
synced 2026-03-02 21:19:12 +00:00
Log and Continue on OSError while collating dates for date filters
Log to understand if error, date can be handled better Mitigates #172
This commit is contained in:
@@ -41,6 +41,9 @@ class DateFilter(BaseFilter):
|
||||
date_in_entry = datetime.strptime(date_in_entry_string, "%Y-%m-%d").timestamp()
|
||||
except ValueError:
|
||||
continue
|
||||
except OSError:
|
||||
logger.debug(f"OSError: Ignoring unprocessable date in entry: {date_in_entry_string}")
|
||||
continue
|
||||
self.date_to_entry_ids[date_in_entry].add(id)
|
||||
|
||||
def can_filter(self, raw_query):
|
||||
|
||||
Reference in New Issue
Block a user