remove news writing to disk to save pi sd card writes

This commit is contained in:
death916 2026-01-27 03:30:27 -08:00
parent 7887a60e67
commit e70a79a41a

View file

@ -100,14 +100,4 @@ class News:
if len(all_entries) > 30:
all_entries = random.sample(all_entries, 30)
try:
async with aiofiles.open("news.txt", "w") as f:
print("Writing news to file...")
for entry in all_entries:
await f.write(
f"[{entry['publish_date']}] {entry['source']}: {entry['title']}\n"
)
except Exception as e:
print(f"Error writing to news.txt: {e}")
return all_entries