From c1cc04063bb20b29c167a661b46535b006673e76 Mon Sep 17 00:00:00 2001 From: Chocobozzz Date: Wed, 2 Sep 2020 15:22:10 +0200 Subject: [PATCH] Fix video deletion --- server/lib/elastic-search-videos.ts | 1 + server/lib/peertube-instance.ts | 6 +++--- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/server/lib/elastic-search-videos.ts b/server/lib/elastic-search-videos.ts index 1c2a1f8..8f07b06 100644 --- a/server/lib/elastic-search-videos.ts +++ b/server/lib/elastic-search-videos.ts @@ -83,6 +83,7 @@ async function getVideoIdsOf (host: string) { aggs: { ids: { terms: { + size: 500000, field: 'id' } } diff --git a/server/lib/peertube-instance.ts b/server/lib/peertube-instance.ts index d178029..dc17190 100644 --- a/server/lib/peertube-instance.ts +++ b/server/lib/peertube-instance.ts @@ -1,9 +1,9 @@ -import { IndexableVideo } from '../types/video.model' -import { doRequest, doRequestWithRetries } from '../helpers/requests' import { ResultList, Video, VideoChannel, VideoDetails } from '@shared/models' -import { IndexableChannel } from '../types/channel.model' +import { doRequestWithRetries } from '../helpers/requests' import { INDEXER_COUNT, REQUESTS } from '../initializers/constants' +import { IndexableChannel } from '../types/channel.model' import { IndexableDoc } from '../types/elastic-search.model' +import { IndexableVideo } from '../types/video.model' async function getVideo (host: string, uuid: string): Promise { const url = 'https://' + host + '/api/v1/videos/' + uuid