File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -43,6 +43,7 @@ def send_news_to_telegram(message):
4343if __name__ == "__main__" :
4444 data_from_db = news_db .create_connection (news_db .DB_FILE )
4545 while True :
46+ time .sleep (1 )
4647 current_time = datetime .now ().strftime ("%H:%M" )
4748 if TIME_TO_SEND_START < current_time < TIME_TO_SEND_END :
4849 logging .info (f"Time: { current_time } . Time to send has come !" )
Original file line number Diff line number Diff line change @@ -3,7 +3,7 @@ version: '3'
33services :
44 news_db :
55 container_name : news_db
6- image : h0d0user/news_db:v0.0.45
6+ image : h0d0user/news_db:v0.0.49
77 restart : always
88 network_mode : host
99 volumes :
@@ -12,7 +12,7 @@ services:
1212
1313 truth_seeker :
1414 container_name : truth_seeker
15- image : h0d0user/truth_seeker:v0.0.45
15+ image : h0d0user/truth_seeker:v0.0.49
1616 restart : always
1717 network_mode : host
1818 depends_on :
@@ -23,7 +23,7 @@ services:
2323
2424 datapath :
2525 container_name : datapath
26- image : h0d0user/datapath:v0.0.45
26+ image : h0d0user/datapath:v0.0.49
2727 restart : always
2828 network_mode : host
2929 depends_on :
Original file line number Diff line number Diff line change @@ -118,8 +118,8 @@ def delete_all_news(conn):
118118 create_table (conn , CREATE_TABLE_SQL )
119119
120120 while True :
121- time .sleep (1 )
122121 CURRENT_TIME = datetime .now ().strftime ("%H:%M" )
122+ time .sleep (1 )
123123 if conn is not None :
124124 send_all_news (conn )
125125 if CURRENT_TIME == TIME_TO_PURGE :
Original file line number Diff line number Diff line change 1515
1616newsapi = NewsApiClient (api_key = API_KEY )
1717
18- TIME_TO_SEARCH = "14 :10"
18+ TIME_TO_SEARCH = "11 :10"
1919
2020
2121# Logging
@@ -69,8 +69,8 @@ def load_to_db(fetch_info: dict):
6969
7070if __name__ == "__main__" :
7171 while True :
72- time .sleep (1 )
7372 CURRENT_TIME = datetime .now ().strftime ("%H:%M" )
73+ time .sleep (1 )
7474 # Pull too much info
7575 if CURRENT_TIME == TIME_TO_SEARCH :
7676 logging .info (f"Time: { CURRENT_TIME } . Time to search has come !" )
You can’t perform that action at this time.
0 commit comments