Explorar o código

更新 'monitor/GA_Daily.py'

miacheng913 %!s(int64=3) %!d(string=hai) anos
pai
achega
c8376872a7
Modificáronse 1 ficheiros con 3 adicións e 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.....')