Remove some FIXME

This commit is contained in:
Chocobozzz
2025-11-17 10:10:49 +01:00
parent 3d3240ae01
commit d68dfe349a
6 changed files with 4 additions and 17 deletions

View File

@@ -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)
}

View File

@@ -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 }) {

View File

@@ -5,9 +5,6 @@ export interface VideoRedundancy {
uuid: string
redundancies: {
// FIXME: remove in v8
files: []
streamingPlaylists: RedundancyInformation[]
}
}

View File

@@ -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)
}

View File

@@ -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)
}

View File

@@ -564,7 +564,6 @@ export class VideoRedundancyModel extends SequelizeModel<VideoRedundancyModel> {
uuid: video.uuid,
redundancies: {
files: [],
streamingPlaylists: streamingPlaylistsRedundancies
}
}