mirror of
https://github.com/etienne-hd/lbc-finder.git
synced 2026-05-01 13:15:35 +02:00
Improve notification reliability with handler retries and post-success ID marking
This commit is contained in:
@@ -26,11 +26,14 @@ class ID:
|
||||
logger.exception("An error occurred while attempting to open the id.json file.")
|
||||
return ids
|
||||
|
||||
def add(self, id: str) -> bool:
|
||||
if not id in self._ids:
|
||||
self._ids.append(id)
|
||||
def contains(self, id_: str) -> bool:
|
||||
return id_ in self._ids
|
||||
|
||||
def add(self, id_: str) -> bool:
|
||||
if not id_ in self._ids:
|
||||
self._ids.append(id_)
|
||||
with open("id.json", "w") as f:
|
||||
json.dump(self._ids[-MAX_ID:], f, indent=3)
|
||||
self._ids = self._ids[-MAX_ID:]
|
||||
return True
|
||||
return False
|
||||
return False
|
||||
|
||||
Reference in New Issue
Block a user