diff options
author | Chocobozzz <me@florianbigard.com> | 2022-08-03 15:08:36 +0200 |
---|---|---|
committer | Chocobozzz <me@florianbigard.com> | 2022-08-03 15:08:36 +0200 |
commit | c795e19663a93c24908a7318975f820bac63164f (patch) | |
tree | 149a303be38eedf5aa5a0ec02938f67c75a267fe /server.ts | |
parent | fd59208e8ccd796f9ad7e35db82d0c33acfcb92c (diff) | |
download | PeerTube-c795e19663a93c24908a7318975f820bac63164f.tar.gz PeerTube-c795e19663a93c24908a7318975f820bac63164f.tar.zst PeerTube-c795e19663a93c24908a7318975f820bac63164f.zip |
Automatically rebuild native modules on ABI change
Diffstat (limited to 'server.ts')
-rw-r--r-- | server.ts | 6 |
1 files changed, 6 insertions, 0 deletions
@@ -138,6 +138,7 @@ import { ServerConfigManager } from '@server/lib/server-config-manager' | |||
138 | import { VideoViewsManager } from '@server/lib/views/video-views-manager' | 138 | import { VideoViewsManager } from '@server/lib/views/video-views-manager' |
139 | import { isTestOrDevInstance } from './server/helpers/core-utils' | 139 | import { isTestOrDevInstance } from './server/helpers/core-utils' |
140 | import { OpenTelemetryMetrics } from '@server/lib/opentelemetry/metrics' | 140 | import { OpenTelemetryMetrics } from '@server/lib/opentelemetry/metrics' |
141 | import { ApplicationModel } from '@server/models/application/application' | ||
141 | 142 | ||
142 | // ----------- Command line ----------- | 143 | // ----------- Command line ----------- |
143 | 144 | ||
@@ -330,12 +331,17 @@ async function startApplication () { | |||
330 | server.listen(port, hostname, async () => { | 331 | server.listen(port, hostname, async () => { |
331 | if (cliOptions.plugins) { | 332 | if (cliOptions.plugins) { |
332 | try { | 333 | try { |
334 | await PluginManager.Instance.rebuildNativePluginsIfNeeded() | ||
335 | |||
333 | await PluginManager.Instance.registerPluginsAndThemes() | 336 | await PluginManager.Instance.registerPluginsAndThemes() |
334 | } catch (err) { | 337 | } catch (err) { |
335 | logger.error('Cannot register plugins and themes.', { err }) | 338 | logger.error('Cannot register plugins and themes.', { err }) |
336 | } | 339 | } |
337 | } | 340 | } |
338 | 341 | ||
342 | ApplicationModel.updateNodeVersions() | ||
343 | .catch(err => logger.error('Cannot update node versions.', { err })) | ||
344 | |||
339 | logger.info('HTTP server listening on %s:%d', hostname, port) | 345 | logger.info('HTTP server listening on %s:%d', hostname, port) |
340 | logger.info('Web server: %s', WEBSERVER.URL) | 346 | logger.info('Web server: %s', WEBSERVER.URL) |
341 | 347 | ||