Overwrite the profile data if the token already exists like in the other implementations.
This commit is contained in:
parent
198d406bc2
commit
1ac581e324
@ -102,7 +102,7 @@ class MongoDbProfilerStorage implements ProfilerStorageInterface
|
||||
'time' => $profile->getTime()
|
||||
);
|
||||
|
||||
return $this->getMongo()->insert(array_filter($record, function ($v) { return !empty($v); }));
|
||||
return $this->getMongo()->update(array('_id' => $profile->getToken()), array_filter($record, function ($v) { return !empty($v); }), array('upsert' => true));
|
||||
}
|
||||
|
||||
/**
|
||||
|
Reference in New Issue
Block a user