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