]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blobdiff - server.ts
Add ability to update some configuration keys
[github/Chocobozzz/PeerTube.git] / server.ts
index a89cdd69aad1621bfff5fe36096df567bb2f52c9..99077a1738c498c2f7076ccf87c23aaa94272b26 100644 (file)
--- a/server.ts
+++ b/server.ts
@@ -1,3 +1,6 @@
+// FIXME: https://github.com/nodejs/node/pull/16853
+require('tls').DEFAULT_ECDH_CURVE = 'auto'
+
 import { isTestInstance } from './server/helpers/core-utils'
 
 if (isTestInstance()) {
@@ -50,8 +53,10 @@ migrate()
 
 // ----------- PeerTube modules -----------
 import { installApplication } from './server/initializers'
-import { activitypubHttpJobScheduler, transcodingJobScheduler, VideosPreviewCache } from './server/lib'
+import { activitypubHttpJobScheduler, transcodingJobScheduler } from './server/lib/jobs'
+import { VideosPreviewCache } from './server/lib/cache'
 import { apiRouter, clientsRouter, staticRouter, servicesRouter, webfingerRouter, activityPubRouter } from './server/controllers'
+import { BadActorFollowScheduler } from './server/lib/schedulers/bad-actor-follow-scheduler'
 
 // ----------- Command line -----------
 
@@ -150,7 +155,7 @@ app.use(function (req, res, next) {
 })
 
 app.use(function (err, req, res, next) {
-  logger.error(err)
+  logger.error(err, err)
   res.sendStatus(err.status || 500)
 })
 
@@ -164,6 +169,8 @@ function onDatabaseInitDone () {
       // ----------- Make the server listening -----------
       server.listen(port, () => {
         VideosPreviewCache.Instance.init(CONFIG.CACHE.PREVIEWS.SIZE)
+        BadActorFollowScheduler.Instance.enable()
+
         activitypubHttpJobScheduler.activate()
         transcodingJobScheduler.activate()