diff options
Diffstat (limited to 'server.ts')
-rw-r--r-- | server.ts | 11 |
1 files changed, 9 insertions, 2 deletions
@@ -44,7 +44,7 @@ checkFFmpeg(CONFIG) | |||
44 | 44 | ||
45 | checkNodeVersion() | 45 | checkNodeVersion() |
46 | 46 | ||
47 | import { checkConfig, checkActivityPubUrls } from './server/initializers/checker-after-init' | 47 | import { checkConfig, checkActivityPubUrls, checkFFmpegVersion } from './server/initializers/checker-after-init' |
48 | 48 | ||
49 | const errorMessage = checkConfig() | 49 | const errorMessage = checkConfig() |
50 | if (errorMessage !== null) { | 50 | if (errorMessage !== null) { |
@@ -120,6 +120,7 @@ import { isHTTPSignatureDigestValid } from './server/helpers/peertube-crypto' | |||
120 | import { PeerTubeSocket } from './server/lib/peertube-socket' | 120 | import { PeerTubeSocket } from './server/lib/peertube-socket' |
121 | import { updateStreamingPlaylistsInfohashesIfNeeded } from './server/lib/hls' | 121 | import { updateStreamingPlaylistsInfohashesIfNeeded } from './server/lib/hls' |
122 | import { PluginsCheckScheduler } from './server/lib/schedulers/plugins-check-scheduler' | 122 | import { PluginsCheckScheduler } from './server/lib/schedulers/plugins-check-scheduler' |
123 | import { PeerTubeVersionCheckScheduler } from './server/lib/schedulers/peertube-version-check-scheduler' | ||
123 | import { Hooks } from './server/lib/plugins/hooks' | 124 | import { Hooks } from './server/lib/plugins/hooks' |
124 | import { PluginManager } from './server/lib/plugins/plugin-manager' | 125 | import { PluginManager } from './server/lib/plugins/plugin-manager' |
125 | import { LiveManager } from './server/lib/live-manager' | 126 | import { LiveManager } from './server/lib/live-manager' |
@@ -160,7 +161,9 @@ morgan.token('user-agent', (req: express.Request) => { | |||
160 | return req.get('user-agent') | 161 | return req.get('user-agent') |
161 | }) | 162 | }) |
162 | app.use(morgan('combined', { | 163 | app.use(morgan('combined', { |
163 | stream: { write: logger.info.bind(logger) }, | 164 | stream: { |
165 | write: (str: string) => logger.info(str, { tags: [ 'http' ] }) | ||
166 | }, | ||
164 | skip: req => CONFIG.LOG.LOG_PING_REQUESTS === false && req.originalUrl === '/api/v1/ping' | 167 | skip: req => CONFIG.LOG.LOG_PING_REQUESTS === false && req.originalUrl === '/api/v1/ping' |
165 | })) | 168 | })) |
166 | 169 | ||
@@ -250,6 +253,9 @@ async function startApplication () { | |||
250 | process.exit(-1) | 253 | process.exit(-1) |
251 | }) | 254 | }) |
252 | 255 | ||
256 | checkFFmpegVersion() | ||
257 | .catch(err => logger.error('Cannot check ffmpeg version', { err })) | ||
258 | |||
253 | // Email initialization | 259 | // Email initialization |
254 | Emailer.Instance.init() | 260 | Emailer.Instance.init() |
255 | 261 | ||
@@ -272,6 +278,7 @@ async function startApplication () { | |||
272 | RemoveOldHistoryScheduler.Instance.enable() | 278 | RemoveOldHistoryScheduler.Instance.enable() |
273 | RemoveOldViewsScheduler.Instance.enable() | 279 | RemoveOldViewsScheduler.Instance.enable() |
274 | PluginsCheckScheduler.Instance.enable() | 280 | PluginsCheckScheduler.Instance.enable() |
281 | PeerTubeVersionCheckScheduler.Instance.enable() | ||
275 | AutoFollowIndexInstances.Instance.enable() | 282 | AutoFollowIndexInstances.Instance.enable() |
276 | 283 | ||
277 | // Redis initialization | 284 | // Redis initialization |