mirror of
https://github.com/Chocobozzz/PeerTube.git
synced 2025-12-05 01:10:36 +00:00
Remove some FIXME
This commit is contained in:
@@ -99,7 +99,6 @@ async function listRedundanciesCLI (options: CommonProgramOptions & { target: Vi
|
||||
if (target === 'remote-videos') {
|
||||
const tmp = streamingPlaylists.reduce((a, b) => a + b.size, 0)
|
||||
|
||||
// FIXME: don't use external dependency to stringify bytes: we already have the functions in the client
|
||||
totalSize = bytes(tmp)
|
||||
}
|
||||
|
||||
|
||||
@@ -280,15 +280,12 @@ export class RunnerServer {
|
||||
version: process.env.PACKAGE_VERSION
|
||||
})
|
||||
|
||||
// FIXME: remove in PeerTube v8: jobTypes has been introduced in PeerTube v7, so do the filter here too
|
||||
const filtered = availableJobs.filter(j => isJobSupported(j, this.enabledJobs))
|
||||
|
||||
if (filtered.length === 0) {
|
||||
if (availableJobs.length === 0) {
|
||||
logger.debug(`No job available on ${server.url} for runner ${server.runnerName}`)
|
||||
return undefined
|
||||
}
|
||||
|
||||
return filtered[0]
|
||||
return availableJobs[0]
|
||||
}
|
||||
|
||||
private async tryToExecuteJobAsync (server: PeerTubeServer, jobToAccept: { uuid: string }) {
|
||||
|
||||
@@ -5,9 +5,6 @@ export interface VideoRedundancy {
|
||||
uuid: string
|
||||
|
||||
redundancies: {
|
||||
// FIXME: remove in v8
|
||||
files: []
|
||||
|
||||
streamingPlaylists: RedundancyInformation[]
|
||||
}
|
||||
}
|
||||
|
||||
@@ -71,9 +71,7 @@ async function buildActivities (actor: MActorLight, start: number, count: number
|
||||
|
||||
activities.push(announceActivity)
|
||||
} else {
|
||||
// FIXME: only use the video URL to reduce load. Breaks compat with PeerTube < 6.0.0
|
||||
const videoObject = await video.toActivityPubObject()
|
||||
const createActivity = buildCreateActivity(video.url, byActor, videoObject, createActivityAudience)
|
||||
const createActivity = buildCreateActivity(video.url, byActor, video.url, createActivityAudience)
|
||||
|
||||
activities.push(createActivity)
|
||||
}
|
||||
|
||||
@@ -445,10 +445,7 @@ class JobQueue {
|
||||
continue
|
||||
}
|
||||
|
||||
let jobs = await queue.getJobs(states, 0, start + count, asc)
|
||||
|
||||
// FIXME: we have sometimes undefined values https://github.com/taskforcesh/bullmq/issues/248
|
||||
jobs = jobs.filter(j => !!j)
|
||||
const jobs = await queue.getJobs(states, 0, start + count, asc)
|
||||
|
||||
results = results.concat(jobs)
|
||||
}
|
||||
|
||||
@@ -564,7 +564,6 @@ export class VideoRedundancyModel extends SequelizeModel<VideoRedundancyModel> {
|
||||
uuid: video.uuid,
|
||||
|
||||
redundancies: {
|
||||
files: [],
|
||||
streamingPlaylists: streamingPlaylistsRedundancies
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user