Pārlūkot izejas kodu

更新历史数据入库时间

林轩 1 gadu atpakaļ
vecāks
revīzija
288731d74c
1 mainītis faili ar 2 papildinājumiem un 2 dzēšanām
  1. 2 2
      crond_script/today_weather.py

+ 2 - 2
crond_script/today_weather.py

@@ -106,7 +106,7 @@ def main():
                     day_obj.content = str(today_data)
                     day_obj.save()
                     try:
-                        if now_hour == 9:
+                        if now_hour == 19:
                             HistoryDayData.objects.create(
                                 cityid = day_obj.cityid,
                                 content = today_data,
@@ -127,7 +127,7 @@ def main():
                         day_obj.save()
                         print(f"request again success: {day_obj.cityid}")
                         try:
-                            if now_hour == 9:
+                            if now_hour == 19:
                                 HistoryDayData.objects.create(
                                     cityid = day_obj.cityid,
                                     content = today_data,