Skip to content

Commit

Permalink
bug fix
Browse files Browse the repository at this point in the history
  • Loading branch information
posmena committed May 28, 2012
1 parent 41d8dab commit a28c61e
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions _private/scripts/processAllWGFeeds.php
Expand Up @@ -7,7 +7,7 @@
$conn = new Mongo('localhost');
$db = $conn->odstech;

$feeds = $db->ot_feeds->find( {"active" => true } );
$feeds = $db->ot_feeds->find( array("active" => true ) );
$feeds->immortal();

$i=0;
Expand All @@ -28,14 +28,15 @@
return;

// TODO - use a merge map reduce after each feed is updated so counts are correct as soon as possible

/*
$db->p20_products->mapReduce( array(
'map' => '
function () {
emit(this.feed_id, {count:1});
}'
,'reduce' => '
function (key, values) {cc
function (key, values) {
var result = {count:0};
values.forEach(function (value) {result.count += value.count;});
return result;
Expand Down

0 comments on commit a28c61e

Please sign in to comment.