Permalink
Browse files

fixed ipad reporting issues

  • Loading branch information...
1 parent 4fef4f1 commit 7bf68b5ff0513c1c9d8b85b15317b234b2ac2245 Greg Allen committed with Basil Shkara Apr 30, 2010
Showing with 4 additions and 3 deletions.
  1. +2 −2 jobs/pull_rankings.py
  2. +2 −1 processors/report_munger.py
View
@@ -34,7 +34,7 @@ def get(self):
if paid:
self.fetch_rankings(pid, jobs.app_store_codes.CATEGORIES['iPad Top 100 Paid'])
# Queue requests for top grossing list
- self.fetch_rankings(pid, jobs.app_store_codes.CATEGORIES['iPad Top Grossing'])
+ self.fetch_rankings(pid, jobs.app_store_codes.CATEGORIES['iPad Top 100 Grossing'])
else:
self.fetch_rankings(pid, jobs.app_store_codes.CATEGORIES['iPad Top 100 Free'])
else:
@@ -57,7 +57,7 @@ def fetch_rankings(self, pid, category):
for store_id in jobs.app_store_codes.COUNTRIES:
count += 1
store_ids_to_process.append(store_id)
- if self._is_int(1.0 * count / countries_per_task):
+ if count % countries_per_task == 0 or count == len(jobs.app_store_codes.COUNTRIES):
# Enqueue task and reset list
taskqueue.add(url='/jobs/pull_rankings/worker',
method='POST',
@@ -71,10 +71,11 @@ def munge(self, day, currency ):
if row[0] != 'APPLE':
continue
+ print row
rowFields = {}
rowFields['productID'] = row[2]
rowFields['date'] = time.strptime( row[11], '%m/%d/%Y' )
- rowFields['salesType'] = int(row[8], 16)
+ rowFields['salesType'] = int(row[8][0], 16)
rowFields['units'] = int(row[9])
rowFields['buyerCurrencyType'] = row[15]

0 comments on commit 7bf68b5

Please sign in to comment.