fix mongo fallback sampling for deep links
This commit is contained in:
@@ -863,10 +863,13 @@ class VideoService
|
||||
}
|
||||
|
||||
for ($attempt = 0; $attempt < 6; $attempt++) {
|
||||
$cursor = $this->VideoModel->getCol()->aggregate([
|
||||
['$match' => $arrFilter],
|
||||
['$sample' => ['size' => 8]],
|
||||
]);
|
||||
$arrPipeline = [];
|
||||
if (!empty($arrFilter)) {
|
||||
$arrPipeline[] = ['$match' => (object)$arrFilter];
|
||||
}
|
||||
$arrPipeline[] = ['$sample' => ['size' => 8]];
|
||||
|
||||
$cursor = $this->VideoModel->getCol()->aggregate($arrPipeline);
|
||||
|
||||
$arrRows = iterator_to_array($cursor);
|
||||
$this->debugFallbackProbe('sample_attempt', [
|
||||
|
||||
Reference in New Issue
Block a user