mirror of
https://github.com/Chocobozzz/PeerTube.git
synced 2024-11-30 12:33:56 -06:00
Process redundancy stats in series
This commit is contained in:
parent
a7944e89bc
commit
d88a3ea5e3
@ -336,7 +336,7 @@ async function updateVideoFromAP (options: {
|
||||
}
|
||||
|
||||
const to = overrideTo || videoObject.to
|
||||
const videoData = await videoActivityObjectToDBAttributes(channel, videoObject, to)
|
||||
const videoData = videoActivityObjectToDBAttributes(channel, videoObject, to)
|
||||
video.name = videoData.name
|
||||
video.uuid = videoData.uuid
|
||||
video.url = videoData.url
|
||||
|
@ -8,6 +8,7 @@ import { VideoCommentModel } from '@server/models/video/video-comment'
|
||||
import { VideoFileModel } from '@server/models/video/video-file'
|
||||
import { VideoPlaylistModel } from '@server/models/video/video-playlist'
|
||||
import { ActivityType, ServerStats, VideoRedundancyStrategyWithManual } from '@shared/models'
|
||||
import * as Bluebird from 'bluebird'
|
||||
|
||||
class StatsManager {
|
||||
|
||||
@ -106,12 +107,10 @@ class StatsManager {
|
||||
|
||||
strategies.push({ strategy: 'manual', size: null })
|
||||
|
||||
return Promise.all(
|
||||
strategies.map(r => {
|
||||
return VideoRedundancyModel.getStats(r.strategy)
|
||||
.then(stats => Object.assign(stats, { strategy: r.strategy, totalSize: r.size }))
|
||||
})
|
||||
)
|
||||
return Bluebird.mapSeries(strategies, r => {
|
||||
return VideoRedundancyModel.getStats(r.strategy)
|
||||
.then(stats => Object.assign(stats, { strategy: r.strategy, totalSize: r.size }))
|
||||
})
|
||||
}
|
||||
|
||||
private buildAPPerType () {
|
||||
|
Loading…
Reference in New Issue
Block a user