diff options
author | 2024-08-13 16:43:34 +0800 | |
---|---|---|
committer | 2024-08-13 16:43:34 +0800 | |
commit | 6f2537df2af55ebee65e44f986f40700efc753fa (patch) | |
tree | 19d97d26dfcc810a90065c1955034177002356cb /main.py | |
parent | 4023bbaa06a5d8c7809f40881fc519bea7613975 (diff) | |
download | miniflux-ai-6f2537df2af55ebee65e44f986f40700efc753fa.tar.gz miniflux-ai-6f2537df2af55ebee65e44f986f40700efc753fa.tar.zst miniflux-ai-6f2537df2af55ebee65e44f986f40700efc753fa.zip |
add loop; add docker image
Diffstat (limited to 'main.py')
-rw-r--r-- | main.py | 8 |
1 files changed, 6 insertions, 2 deletions
@@ -1,4 +1,6 @@ import os +import time + from openai import OpenAI import miniflux from markdownify import markdownify as md @@ -85,5 +87,7 @@ def process_entry(entry): miniflux_client.update_entry(entry['id'], content='摘要:' + llm_result + '<hr><br />' + entry['content']) return None -with concurrent.futures.ThreadPoolExecutor() as executor: - futures = [executor.submit(process_entry, i) for i in entries['entries']]
\ No newline at end of file +while True: + with concurrent.futures.ThreadPoolExecutor() as executor: + futures = [executor.submit(process_entry, i) for i in entries['entries']] + time.sleep(60)
\ No newline at end of file |