Skip to content

Commit

Permalink
fixed ipad reporting issues
Browse files Browse the repository at this point in the history
  • Loading branch information
Greg Allen authored and Basil Shkara committed Jun 7, 2010
1 parent 4fef4f1 commit 7bf68b5
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
4 changes: 2 additions & 2 deletions jobs/pull_rankings.py
Expand Up @@ -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:
Expand All @@ -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',
Expand Down
3 changes: 2 additions & 1 deletion processors/report_munger.py
Expand Up @@ -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]
Expand Down

0 comments on commit 7bf68b5

Please sign in to comment.