mirror of https://github.com/Chocobozzz/PeerTube
Update server dependencies
parent
35540f3806
commit
a91e9beb3f
|
@ -39,7 +39,7 @@ const loggerFormat = winston.format.printf((info) => {
|
||||||
if (CONFIG.LOG.PRETTIFY_SQL) {
|
if (CONFIG.LOG.PRETTIFY_SQL) {
|
||||||
additionalInfos += '\n' + sqlFormat(info.sql, {
|
additionalInfos += '\n' + sqlFormat(info.sql, {
|
||||||
language: 'sql',
|
language: 'sql',
|
||||||
indent: ' '
|
tabWidth: 2
|
||||||
})
|
})
|
||||||
} else {
|
} else {
|
||||||
additionalInfos += ' - ' + info.sql
|
additionalInfos += ' - ' + info.sql
|
||||||
|
|
|
@ -57,7 +57,7 @@ const consoleLoggerFormat = format.printf(info => {
|
||||||
if (CONFIG.LOG.PRETTIFY_SQL) {
|
if (CONFIG.LOG.PRETTIFY_SQL) {
|
||||||
additionalInfos += '\n' + sqlFormat(info.sql, {
|
additionalInfos += '\n' + sqlFormat(info.sql, {
|
||||||
language: 'sql',
|
language: 'sql',
|
||||||
indent: ' '
|
tabWidth: 2
|
||||||
})
|
})
|
||||||
} else {
|
} else {
|
||||||
additionalInfos += ' - ' + info.sql
|
additionalInfos += ' - ' + info.sql
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
import { createClient, RedisClientOptions, RedisModules, RedisScripts } from 'redis'
|
import { createClient, RedisClientOptions, RedisModules } from 'redis'
|
||||||
import { exists } from '@server/helpers/custom-validators/misc'
|
import { exists } from '@server/helpers/custom-validators/misc'
|
||||||
import { sha256 } from '@shared/extra-utils'
|
import { sha256 } from '@shared/extra-utils'
|
||||||
import { logger } from '../helpers/logger'
|
import { logger } from '../helpers/logger'
|
||||||
|
@ -16,16 +16,12 @@ import {
|
||||||
WEBSERVER
|
WEBSERVER
|
||||||
} from '../initializers/constants'
|
} from '../initializers/constants'
|
||||||
|
|
||||||
// Only used for typings
|
|
||||||
// TODO: remove when https://github.com/microsoft/TypeScript/issues/37181 is fixed
|
|
||||||
const redisClientWrapperForType = () => createClient<{}, RedisScripts>()
|
|
||||||
|
|
||||||
class Redis {
|
class Redis {
|
||||||
|
|
||||||
private static instance: Redis
|
private static instance: Redis
|
||||||
private initialized = false
|
private initialized = false
|
||||||
private connected = false
|
private connected = false
|
||||||
private client: ReturnType<typeof redisClientWrapperForType>
|
private client: ReturnType<typeof createClient>
|
||||||
private prefix: string
|
private prefix: string
|
||||||
|
|
||||||
private constructor () {
|
private constructor () {
|
||||||
|
|
|
@ -110,7 +110,7 @@ export class VideoLiveSessionModel extends Model<Partial<AttributesOnly<VideoLiv
|
||||||
static listSessionsOfLiveForAPI (options: { videoId: number }) {
|
static listSessionsOfLiveForAPI (options: { videoId: number }) {
|
||||||
const { videoId } = options
|
const { videoId } = options
|
||||||
|
|
||||||
const query: FindOptions<VideoLiveSessionModel> = {
|
const query: FindOptions<AttributesOnly<VideoLiveSessionModel>> = {
|
||||||
where: {
|
where: {
|
||||||
liveVideoId: videoId
|
liveVideoId: videoId
|
||||||
},
|
},
|
||||||
|
|
Loading…
Reference in New Issue