Beispiel #1
0
 def prcs_buffer():
     data_prcs_buffer = r.blpop("data_prcs_buffer", 0)
     connect_mysql.delete("data_prcs_buffer")
     connect_mysql.insert("data_prcs_history",
                          data_prcs_buffer[1].decode('utf-8'))
     connect_mysql.insert("data_prcs_buffer",
                          data_prcs_buffer[1].decode('utf-8'))
Beispiel #2
0
 def caes_buffer():
     data_caes_buffer = r.blpop("data_caes_buffer", 0)
     connect_mysql.delete("data_caes_buffer")
     connect_mysql.insert("data_caes_buffer",
                          data_caes_buffer[1].decode('utf-8'))
     connect_mysql.insert("data_caes_history",
                          str(eval(data_caes_buffer[1])[:-2]))
Beispiel #3
0
    def ctyd_buffer():
        data_ctyd_buffer = r.blpop("data_ctyd_buffer", 0)

        mylist = list(eval(data_ctyd_buffer[1]))
        mylist[0] = mylist[0].strftime('%Y-%m-%d %H:%M:%S')

        connect_mysql.delete("data_ctyd_buffer")
        connect_mysql.insert("data_ctyd_history", str(tuple(mylist)))
        connect_mysql.insert("data_ctyd_buffer", str(tuple(mylist)))
Beispiel #4
0
 def spgs_kzg():
     # 先删除一条记录在添加达到更新目的
     data_spgs_kzg = r.blpop("data_spgs_kzg", 0)
     connect_mysql.delete("data_spgs_kzg")
     connect_mysql.insert("data_spgs_kzg", data_spgs_kzg[1].decode('utf-8'))
Beispiel #5
0
 def mcds_df():
     # 先删除一条记录在添加达到更新目的
     data_mcds_df = r.blpop("data_mcds_df", 0)
     connect_mysql.delete("data_mcds_df")
     connect_mysql.insert("data_mcds_df", data_mcds_df[1].decode('utf-8'))
Beispiel #6
0
 def caes_dp():
     # 先删除一条记录再添加达到更新目的
     data_caes_dp = r.blpop("data_caes_dp", 0)
     connect_mysql.delete("data_caes_dp")
     connect_mysql.insert("data_caes_dp", data_caes_dp[1].decode('utf-8'))