Skip to content

Commit

Permalink
Merge pull request #12 from zarathustra323/master
Browse files Browse the repository at this point in the history
Memory leak attempt #5
  • Loading branch information
Jacob Bare committed Oct 28, 2014
2 parents 572e888 + 9012586 commit 0657695
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions src/Cygnus/OlyticsBundle/Controller/BacksyncController.php
Original file line number Diff line number Diff line change
Expand Up @@ -71,8 +71,7 @@ public function indexAction()
// ->upsert(true)
// ;

$collection = $this->getFeedConnection()->selectCollection($this->getFeedDb($group), $this->getFeedCollection($group));

$collection = $this->getFeedConnection()->selectCollection($this->getFeedDb($group), $this->getFeedCollection($group))->getMongoCollection();
foreach ($adEventCursor as $adEvent) {

set_time_limit(10);
Expand Down Expand Up @@ -138,7 +137,7 @@ public function indexAction()
public function doFeedUpsert($collection, $metadata, array $newObj)
{
try {
$collection->upsert(['metadata' => $metadata], $newObj);
$collection->update(['metadata' => $metadata], $newObj, ['upsert' => true]);
} catch (\MongoCursorException $e) {
if ($e->getCode() != 17280) {
// Throw all but 'key too large to index'
Expand Down

0 comments on commit 0657695

Please sign in to comment.