Skip to content

Commit

Permalink
Memory leak attempt #5
Browse files Browse the repository at this point in the history
  • Loading branch information
Jacob Bare committed Oct 28, 2014
1 parent d147c0e commit 9012586
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 9012586

Please sign in to comment.