Index: trunk/fundraiser-statistics/fundraiser-scripts/fundraiser_reporting.py |
— | — | @@ -48,8 +48,8 @@ |
49 | 49 | def init_db(self): |
50 | 50 | """ Establish connection """ |
51 | 51 | #db = MySQLdb.connect(host='db10.pmtpa.wmnet', user='rfaulk', db='faulkner') |
52 | | - self.db = MySQLdb.connect(host='127.0.0.1', user='rfaulk', db='faulkner', port=3307) |
53 | | - #self.db = MySQLdb.connect(host='storage3.pmtpa.wmnet', user='rfaulk', db='faulkner') |
| 52 | + #self.db = MySQLdb.connect(host='127.0.0.1', user='rfaulk', db='faulkner', port=3307) |
| 53 | + self.db = MySQLdb.connect(host='storage3.pmtpa.wmnet', user='rfaulk', db='faulkner') |
54 | 54 | |
55 | 55 | """ Create cursor """ |
56 | 56 | self.cur = self.db.cursor() |
— | — | @@ -446,7 +446,7 @@ |
447 | 447 | |
448 | 448 | query_name = 'report_bannerLP_metrics' # rename query to work with query store |
449 | 449 | sql_stmnt = query_obj.format_query(query_name, sql_stmnt, [start_time, end_time, campaign]) |
450 | | - |
| 450 | + #print sql_stmnt |
451 | 451 | key_index = query_obj.get_banner_index(query_name) |
452 | 452 | time_index = query_obj.get_time_index(query_name) |
453 | 453 | metric_index = query_obj.get_metric_index(query_name, metric_name) |
— | — | @@ -552,9 +552,9 @@ |
553 | 553 | |
554 | 554 | # Current date & time |
555 | 555 | now = datetime.datetime.now() |
556 | | - #UTC = 8 |
557 | | - #delta = datetime.timedelta(hours=UTC) |
558 | | - #now = now + delta |
| 556 | + UTC = 8 |
| 557 | + delta = datetime.timedelta(hours=UTC) |
| 558 | + now = now + delta |
559 | 559 | |
560 | 560 | # ESTABLISH THE START TIME TO PULL ANALYTICS |
561 | 561 | hours_back = 24 |
— | — | @@ -608,7 +608,7 @@ |
609 | 609 | if min_elem < min_time: |
610 | 610 | min_time = min_elem |
611 | 611 | |
612 | | - ranges = [min_time, -1] |
| 612 | + ranges = [min_time, 0] |
613 | 613 | |
614 | 614 | self.gen_plot(metrics, times, title, xlabel, ylabel, ranges, subplot_index, fname) |
615 | 615 | |
Index: trunk/fundraiser-statistics/fundraiser-scripts/sql/report_banner_metrics.sql |
— | — | @@ -63,5 +63,5 @@ |
64 | 64 | on ecomm.banner = lp.utm_source and ecomm.hr = lp.hr |
65 | 65 | |
66 | 66 | group by 1,2,3,4 |
67 | | -having impressions > 100000 and donations > 50 |
| 67 | +having impressions > 100000 and donations > 20 |
68 | 68 | order by 1 desc; |