write in result file
This commit is contained in:
parent
221d90b398
commit
d968e89e07
2 changed files with 2 additions and 4 deletions
1
main.py
1
main.py
|
@ -46,6 +46,7 @@ def main():
|
|||
if result_file.was_already_sent(sha256, menus):
|
||||
return
|
||||
is_update = result_file.is_update(sha256, menus)
|
||||
result_file.write(sha256, menus)
|
||||
message = message_formatter.create_message(menus, is_update)
|
||||
|
||||
logger.info(
|
||||
|
|
|
@ -30,7 +30,4 @@ class ResultFile:
|
|||
return False
|
||||
content = self.path.read_text()
|
||||
date = f"{menus.days[0]} - {menus.month} - {datetime.date.today().year}"
|
||||
res = f"{sha256} - {date}" not in content and date in content
|
||||
if res:
|
||||
self.write(sha256, menus)
|
||||
return res
|
||||
return f"{sha256} - {date}" not in content and date in content
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue