Explorar el Código

更新 'monitor/GA_Daily.py'

miacheng913 hace 3 años
padre
commit
c8376872a7
Se han modificado 1 ficheros con 3 adiciones y 1 borrados
  1. 3 1
      monitor/GA_Daily.py

+ 3 - 1
monitor/GA_Daily.py

@@ -142,7 +142,9 @@ def main():
   result=[]
   for elmt in ga_dict:
       print(elmt)
-      send_msg(elmt['ga:pageviews'])
+      hour = datetime.now().strftime('%H')
+      if int(hour)+1 > 8 :
+      	send_msg(elmt['ga:pageviews'])
 #      result.append(elmt)
   print('inserting.....')