Skip to content

Commit

Permalink
Revert the quere to the older one again
Browse files Browse the repository at this point in the history
Without the check for the tries a prior failed job, without any history is skipped
  • Loading branch information
nille02 committed Dec 11, 2024
1 parent 5912927 commit 1665be2
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion lib/urlwatch/storage.py
Original file line number Diff line number Diff line change
Expand Up @@ -605,7 +605,9 @@ def get_history_data(self, guid, count=1):
def has_history_data(self, guid):
if not self._cached_has_history_data_set:
self._cached_has_history_data_set = frozenset(guid[0] for guid in
list(CacheEntry.query(self.db, CacheEntry.c.guid.distinct("guid")))) # noqa:E711
list(CacheEntry.query(self.db,CacheEntry.c.guid,
where=((CacheEntry.c.tries == 0) |
(CacheEntry.c.tries == None))))) # noqa:E711
return guid in self._cached_has_history_data_set

def save(self, job, guid, data, timestamp, tries, etag=None):
Expand Down

0 comments on commit 1665be2

Please sign in to comment.