-
-const lTags = loggerTagsFactory('ap', 'video-rate', 'create')
-
-async function createRates (ratesUrl: string[], video: MVideo, rate: VideoRateType) {
- await Bluebird.map(ratesUrl, async rateUrl => {
- try {
- await createRate(rateUrl, video, rate)
- } catch (err) {
- logger.info('Cannot add rate %s.', rateUrl, { err, ...lTags(rateUrl, video.uuid, video.url) })
- }
- }, { concurrency: CRAWL_REQUEST_CONCURRENCY })
-}