projects
/
oweals
/
peertube.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Add commentsEnabled field to AS context
[oweals/peertube.git]
/
server
/
initializers
/
constants.ts
diff --git
a/server/initializers/constants.ts
b/server/initializers/constants.ts
index f8e6b52d7a77adacbdd7356047cb2f7157310279..2c64efe1fbd2b5c6926c6c2627af3186882df22f 100644
(file)
--- a/
server/initializers/constants.ts
+++ b/
server/initializers/constants.ts
@@
-9,7
+9,7
@@
import { isTestInstance, root, sanitizeHost, sanitizeUrl } from '../helpers/core
// ---------------------------------------------------------------------------
// ---------------------------------------------------------------------------
-const LAST_MIGRATION_VERSION = 1
60
+const LAST_MIGRATION_VERSION = 1
75
// ---------------------------------------------------------------------------
// ---------------------------------------------------------------------------
@@
-40,12
+40,12
@@
const OAUTH_LIFETIME = {
// ---------------------------------------------------------------------------
// ---------------------------------------------------------------------------
-// Number of points we add/remove
from a friend
after a successful/bad request
-const
SERVERS
_SCORE = {
+// Number of points we add/remove after a successful/bad request
+const
ACTOR_FOLLOW
_SCORE = {
PENALTY: -10,
BONUS: 10,
PENALTY: -10,
BONUS: 10,
- BASE: 100,
- MAX: 1000
+ BASE: 100
0
,
+ MAX: 1000
0
}
const FOLLOW_STATES: { [ id: string ]: FollowState } = {
}
const FOLLOW_STATES: { [ id: string ]: FollowState } = {
@@
-76,6
+76,9
@@
const JOBS_FETCH_LIMIT_PER_CYCLE = {
// 1 minutes
let JOBS_FETCHING_INTERVAL = 60000
// 1 minutes
let JOBS_FETCHING_INTERVAL = 60000
+// 1 hour
+let SCHEDULER_INTERVAL = 60000 * 60
+
// ---------------------------------------------------------------------------
const CONFIG = {
// ---------------------------------------------------------------------------
const CONFIG = {
@@
-267,7
+270,8
@@
const SERVER_ACTOR_NAME = 'peertube'
const ACTIVITY_PUB = {
POTENTIAL_ACCEPT_HEADERS: [
'application/activity+json',
const ACTIVITY_PUB = {
POTENTIAL_ACCEPT_HEADERS: [
'application/activity+json',
- 'application/ld+json'
+ 'application/ld+json',
+ 'application/ld+json; profile="https://www.w3.org/ns/activitystreams"'
],
ACCEPT_HEADER: 'application/activity+json, application/ld+json',
PUBLIC: 'https://www.w3.org/ns/activitystreams#Public',
],
ACCEPT_HEADER: 'application/activity+json, application/ld+json',
PUBLIC: 'https://www.w3.org/ns/activitystreams#Public',
@@
-279,7
+283,8
@@
const ACTIVITY_PUB = {
TORRENT: [ 'application/x-bittorrent' ],
MAGNET: [ 'application/x-bittorrent;x-scheme-handler/magnet' ]
},
TORRENT: [ 'application/x-bittorrent' ],
MAGNET: [ 'application/x-bittorrent;x-scheme-handler/magnet' ]
},
- ACTOR_REFRESH_INTERVAL: 3600 * 24 // 1 day
+ MAX_RECURSION_COMMENTS: 100,
+ ACTOR_REFRESH_INTERVAL: 3600 * 24 * 1000 // 1 day
}
const ACTIVITY_PUB_ACTOR_TYPES: { [ id: string ]: ActivityPubActorType } = {
}
const ACTIVITY_PUB_ACTOR_TYPES: { [ id: string ]: ActivityPubActorType } = {
@@
-345,14
+350,15
@@
const OPENGRAPH_AND_OEMBED_COMMENT = '<!-- open graph and oembed tags -->'
// Special constants for a test instance
if (isTestInstance() === true) {
// Special constants for a test instance
if (isTestInstance() === true) {
-
SERVERS
_SCORE.BASE = 20
+
ACTOR_FOLLOW
_SCORE.BASE = 20
JOBS_FETCHING_INTERVAL = 1000
REMOTE_SCHEME.HTTP = 'http'
REMOTE_SCHEME.WS = 'ws'
STATIC_MAX_AGE = '0'
ACTIVITY_PUB.COLLECTION_ITEMS_PER_PAGE = 2
JOBS_FETCHING_INTERVAL = 1000
REMOTE_SCHEME.HTTP = 'http'
REMOTE_SCHEME.WS = 'ws'
STATIC_MAX_AGE = '0'
ACTIVITY_PUB.COLLECTION_ITEMS_PER_PAGE = 2
- ACTIVITY_PUB.ACTOR_REFRESH_INTERVAL =
60 // 1 minute
+ ACTIVITY_PUB.ACTOR_REFRESH_INTERVAL =
10 * 1000 // 10 seconds
CONSTRAINTS_FIELDS.ACTORS.AVATAR.FILE_SIZE.max = 100 * 1024 // 100KB
CONSTRAINTS_FIELDS.ACTORS.AVATAR.FILE_SIZE.max = 100 * 1024 // 100KB
+ SCHEDULER_INTERVAL = 10000
}
CONFIG.WEBSERVER.URL = sanitizeUrl(CONFIG.WEBSERVER.SCHEME + '://' + CONFIG.WEBSERVER.HOSTNAME + ':' + CONFIG.WEBSERVER.PORT)
}
CONFIG.WEBSERVER.URL = sanitizeUrl(CONFIG.WEBSERVER.SCHEME + '://' + CONFIG.WEBSERVER.HOSTNAME + ':' + CONFIG.WEBSERVER.PORT)
@@
-377,7
+383,7
@@
export {
OAUTH_LIFETIME,
OPENGRAPH_AND_OEMBED_COMMENT,
PAGINATION_COUNT_DEFAULT,
OAUTH_LIFETIME,
OPENGRAPH_AND_OEMBED_COMMENT,
PAGINATION_COUNT_DEFAULT,
-
SERVERS
_SCORE,
+
ACTOR_FOLLOW
_SCORE,
PREVIEWS_SIZE,
REMOTE_SCHEME,
FOLLOW_STATES,
PREVIEWS_SIZE,
REMOTE_SCHEME,
FOLLOW_STATES,
@@
-395,5
+401,6
@@
export {
VIDEO_LICENCES,
VIDEO_RATE_TYPES,
VIDEO_MIMETYPE_EXT,
VIDEO_LICENCES,
VIDEO_RATE_TYPES,
VIDEO_MIMETYPE_EXT,
- AVATAR_MIMETYPE_EXT
+ AVATAR_MIMETYPE_EXT,
+ SCHEDULER_INTERVAL
}
}