yf_yzl před 2 roky
rodič
revize
912bdd5418
1 změnil soubory, kde provedl 0 přidání a 9 odebrání
  1. 0 9
      crond_script/crond_weather.py

+ 0 - 9
crond_script/crond_weather.py

@@ -63,7 +63,6 @@ province_dict = {
 "65": '新疆维吾尔自治区'
 }
 
-db = "/data/weather/weather.db"
 def init_data():
     # 导入全部的城市
     for k in all_city:
@@ -82,14 +81,6 @@ def main():
     if not district:
         init_data()
     logging.warning("up...")
-    conn1 = sqlite3.connect(db)
-    cursor1 = conn1.cursor()
-    sql = """
-        select * from district where id > 65
-    """
-    cursor1.execute(sql)
-    results = cursor1.fetchall()
-
     results = District.objects.filter(id__gt = 65)
     # 更新数据
     for row in results: