- env: TEST_SUITE=lint
script:
- - NODE_PENDING_JOB_WAIT=1000 travis_retry npm run travis -- "$TEST_SUITE"
+ - NODE_PENDING_JOB_WAIT=2000 travis_retry npm run travis -- "$TEST_SUITE"
after_failure:
- cat test1/logs/peertube.log
const lock = new AsyncLock({ timeout: 5000 })
function cacheRoute (lifetimeArg: string | number) {
+ const lifetime = parseDurationToMs(lifetimeArg)
+
return async function (req: express.Request, res: express.Response, next: express.NextFunction) {
const redisKey = Redis.Instance.generateCachedRouteKey(req)
res.send = (body) => {
if (res.statusCode >= 200 && res.statusCode < 400) {
const contentType = res.get('content-type')
- const lifetime = parseDurationToMs(lifetimeArg)
Redis.Instance.setCachedRoute(req, body, lifetime, contentType, res.statusCode)
.then(() => done())
followerActorId: number
includeLocalVideos: boolean
+ withoutId?: boolean
+
filter?: VideoFilter
categoryOneOf?: number[]
nsfw?: boolean
return query
},
[ ScopeNames.AVAILABLE_FOR_LIST_IDS ]: (options: AvailableForListIDsOptions) => {
+ const attributes = options.withoutId === true ? [] : [ 'id' ]
+
const query: FindOptions = {
raw: true,
- attributes: [ 'id' ],
+ attributes,
where: {
id: {
[ Op.and ]: [
const scopeOptions: AvailableForListIDsOptions = {
serverAccountId: serverActor.Account.id,
followerActorId,
- includeLocalVideos: true
+ includeLocalVideos: true,
+ withoutId: true // Don't break aggregation
}
const query: FindOptions = {
after(async function () {
MockSmtpServer.Instance.kill()
- // await cleanupTests([ server ])
+ await cleanupTests([ server ])
})
})
import {
addVideoChannel,
addVideoInPlaylist,
- checkPlaylistFilesWereRemoved, cleanupTests,
+ checkPlaylistFilesWereRemoved,
+ cleanupTests,
createUser,
createVideoPlaylist,
deleteVideoChannel,
deleteVideoPlaylist,
- doubleFollow, doVideosExistInMyPlaylist,
+ doubleFollow,
+ doVideosExistInMyPlaylist,
flushAndRunMultipleServers,
- flushTests,
getAccountPlaylistsList,
- getAccountPlaylistsListWithToken, getMyUserInformation,
+ getAccountPlaylistsListWithToken,
+ getMyUserInformation,
getPlaylistVideos,
getVideoChannelPlaylistsList,
getVideoPlaylist,
getVideoPlaylistPrivacies,
getVideoPlaylistsList,
getVideoPlaylistWithToken,
- killallServers,
removeUser,
removeVideoFromPlaylist,
reorderVideosPlaylist,