r79073 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r79072‎ | r79073 | r79074 >
Date:17:22, 27 December 2010
Author:rfaulk
Status:deferred
Tags:
Comment:
End time on reporting queries moved five minutes earlier from min=00 to min=55.
Modified paths:
  • /trunk/fundraiser-statistics/fundraiser-scripts/fundraiser_reporting.py (modified) (history)

Diff [purge]

Index: trunk/fundraiser-statistics/fundraiser-scripts/fundraiser_reporting.py
@@ -69,6 +69,7 @@
7070 delta = datetime.timedelta(hours=-hours_back)
7171
7272 time_obj = now + delta
 73+ now = now + datetime.timedelta(hours=-1) # Move an hour back to terminate at 55 minute
7374
7475 if time_obj.month < 10:
7576 month = '0' + str(time_obj.month)
@@ -102,7 +103,7 @@
103104 hour_e = str(now.hour)
104105
105106 start_time = str(time_obj.year) + month + day + hour + '0000'
106 - end_time = str(now.year) + month_e + day_e + hour_e + '0000'
 107+ end_time = str(now.year) + month_e + day_e + hour_e + '5500'
107108
108109 return [start_time, end_time]
109110
@@ -552,9 +553,9 @@
553554
554555 # Current date & time
555556 now = datetime.datetime.now()
556 - UTC = 8
557 - delta = datetime.timedelta(hours=UTC)
558 - now = now + delta
 557+ #UTC = 8
 558+ #delta = datetime.timedelta(hours=UTC)
 559+ #now = now + delta
559560
560561 # ESTABLISH THE START TIME TO PULL ANALYTICS
561562 hours_back = 24
@@ -622,13 +623,13 @@
623624
624625 # Look at campaigns over the past 24 hours
625626 now = datetime.datetime.now()
626 - hours_back = 24
 627+ hours_back = 72
627628 times = self.gen_date_strings_hr(now, hours_back)
628629
629630 query_obj = qs.query_store()
630631 sql_stmnt = mh.read_sql('./sql/report_latest_campaign.sql')
631632 sql_stmnt = query_obj.format_query(query_name, sql_stmnt, [times[0]])
632 -
 633+ print sql_stmnt
633634 campaign_index = query_obj.get_campaign_index(query_name)
634635 time_index = query_obj.get_time_index(query_name)
635636

Status & tagging log