From b36f41ca09e92ecb30d367d91d1089a23d10d585 Mon Sep 17 00:00:00 2001 From: Chocobozzz Date: Fri, 14 Sep 2018 09:57:21 +0200 Subject: Add trending videos strategy --- config/default.yaml | 3 +++ config/production.yaml.example | 3 +++ config/test.yaml | 3 +++ 3 files changed, 9 insertions(+) (limited to 'config') diff --git a/config/default.yaml b/config/default.yaml index af29a4379..ecb809c6a 100644 --- a/config/default.yaml +++ b/config/default.yaml @@ -74,6 +74,9 @@ redundancy: # - # size: '10GB' # strategy: 'most-views' # Cache videos that have the most views +# - +# size: '10GB' +# strategy: 'trending' # Cache trending videos cache: previews: diff --git a/config/production.yaml.example b/config/production.yaml.example index ddd43093f..48d69e987 100644 --- a/config/production.yaml.example +++ b/config/production.yaml.example @@ -75,6 +75,9 @@ redundancy: # - # size: '10GB' # strategy: 'most-views' # Cache videos that have the most views +# - +# size: '10GB' +# strategy: 'trending' # Cache trending videos ############################################################################### # diff --git a/config/test.yaml b/config/test.yaml index 0f280eabd..73bc5da98 100644 --- a/config/test.yaml +++ b/config/test.yaml @@ -26,6 +26,9 @@ redundancy: - size: '100KB' strategy: 'most-views' + - + size: '100KB' + strategy: 'trending' cache: previews: -- cgit v1.2.3 From 3f6b6a565dc98a658ec9d8f697252788c0faa46d Mon Sep 17 00:00:00 2001 From: Chocobozzz Date: Fri, 14 Sep 2018 11:05:38 +0200 Subject: Add recently added redundancy strategy --- config/default.yaml | 4 ++++ config/production.yaml.example | 4 ++++ config/test.yaml | 4 ++++ 3 files changed, 12 insertions(+) (limited to 'config') diff --git a/config/default.yaml b/config/default.yaml index ecb809c6a..adac9deeb 100644 --- a/config/default.yaml +++ b/config/default.yaml @@ -77,6 +77,10 @@ redundancy: # - # size: '10GB' # strategy: 'trending' # Cache trending videos +# - +# size: '10GB' +# strategy: 'recently-added' # Cache recently added videos +# minViews: 10 # Having at least x views cache: previews: diff --git a/config/production.yaml.example b/config/production.yaml.example index 48d69e987..ca7b936c2 100644 --- a/config/production.yaml.example +++ b/config/production.yaml.example @@ -78,6 +78,10 @@ redundancy: # - # size: '10GB' # strategy: 'trending' # Cache trending videos +# - +# size: '10GB' +# strategy: 'recently-added' # Cache recently added videos +# minViews: 10 # Having at least x views ############################################################################### # diff --git a/config/test.yaml b/config/test.yaml index 73bc5da98..517fc7449 100644 --- a/config/test.yaml +++ b/config/test.yaml @@ -29,6 +29,10 @@ redundancy: - size: '100KB' strategy: 'trending' + - + size: '100KB' + strategy: 'recently-added' + minViews: 10 cache: previews: -- cgit v1.2.3 From c07b6041111daa6dd5d611f31e31819db5992ba8 Mon Sep 17 00:00:00 2001 From: Chocobozzz Date: Mon, 17 Sep 2018 11:28:08 +0200 Subject: Fix checker if we don't have redundancy strategies --- config/test.yaml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'config') diff --git a/config/test.yaml b/config/test.yaml index 517fc7449..16113211e 100644 --- a/config/test.yaml +++ b/config/test.yaml @@ -24,13 +24,13 @@ log: redundancy: videos: - - size: '100KB' + size: '10MB' strategy: 'most-views' - - size: '100KB' + size: '10MB' strategy: 'trending' - - size: '100KB' + size: '10MB' strategy: 'recently-added' minViews: 10 -- cgit v1.2.3 From df182b373fc49f20188d531494e1bff1a9ad247e Mon Sep 17 00:00:00 2001 From: Rigel Kent Date: Tue, 18 Sep 2018 11:18:51 +0200 Subject: normalize robot.txt and specify test servers as scope of security audits --- config/default.yaml | 2 +- config/production.yaml.example | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'config') diff --git a/config/default.yaml b/config/default.yaml index adac9deeb..ab07bfedd 100644 --- a/config/default.yaml +++ b/config/default.yaml @@ -142,7 +142,7 @@ instance: # Robot.txt rules. To disallow robots to crawl your instance and disallow indexation of your site, add '/' to "Disallow:' robots: | User-agent: * - Disallow: '' + Disallow: # Security.txt rules. To discourage researchers from testing your instance and disable security.txt integration, set this to an empty string. securitytxt: "# If you would like to report a security issue\n# you may report it to:\nContact: https://github.com/Chocobozzz/PeerTube/blob/develop/SECURITY.md\nContact: mailto:" diff --git a/config/production.yaml.example b/config/production.yaml.example index ca7b936c2..f9557b8eb 100644 --- a/config/production.yaml.example +++ b/config/production.yaml.example @@ -156,7 +156,7 @@ instance: # Robot.txt rules. To disallow robots to crawl your instance and disallow indexation of your site, add '/' to "Disallow:' robots: | User-agent: * - Disallow: '' + Disallow: # Security.txt rules. To discourage researchers from testing your instance and disable security.txt integration, set this to an empty string. securitytxt: "# If you would like to report a security issue\n# you may report it to:\nContact: https://github.com/Chocobozzz/PeerTube/blob/develop/SECURITY.md\nContact: mailto:" -- cgit v1.2.3 From 098eb37797fdadd4adf660b76867da68061fd588 Mon Sep 17 00:00:00 2001 From: Chocobozzz Date: Tue, 18 Sep 2018 11:02:51 +0200 Subject: Reduce video.ts file size by moving some methods in other files --- config/test.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'config') diff --git a/config/test.yaml b/config/test.yaml index 16113211e..d3e0e49ac 100644 --- a/config/test.yaml +++ b/config/test.yaml @@ -32,7 +32,7 @@ redundancy: - size: '10MB' strategy: 'recently-added' - minViews: 10 + minViews: 1 cache: previews: -- cgit v1.2.3 From d9bdd007d7a1368d2a13127ecb5c0a81a18a8c04 Mon Sep 17 00:00:00 2001 From: Chocobozzz Date: Wed, 19 Sep 2018 16:12:07 +0200 Subject: Put config redundancy strategies in "strategies" subkey --- config/default.yaml | 21 +++++++++++---------- config/production.yaml.example | 21 +++++++++++---------- config/test.yaml | 21 +++++++++++---------- 3 files changed, 33 insertions(+), 30 deletions(-) (limited to 'config') diff --git a/config/default.yaml b/config/default.yaml index ab07bfedd..00eeaea8c 100644 --- a/config/default.yaml +++ b/config/default.yaml @@ -71,16 +71,17 @@ trending: # Once you have defined your strategies, choose which instances you want to cache in admin -> manage follows -> following redundancy: videos: -# - -# size: '10GB' -# strategy: 'most-views' # Cache videos that have the most views -# - -# size: '10GB' -# strategy: 'trending' # Cache trending videos -# - -# size: '10GB' -# strategy: 'recently-added' # Cache recently added videos -# minViews: 10 # Having at least x views + strategies: +# - +# size: '10GB' +# strategy: 'most-views' # Cache videos that have the most views +# - +# size: '10GB' +# strategy: 'trending' # Cache trending videos +# - +# size: '10GB' +# strategy: 'recently-added' # Cache recently added videos +# minViews: 10 # Having at least x views cache: previews: diff --git a/config/production.yaml.example b/config/production.yaml.example index f9557b8eb..28770e480 100644 --- a/config/production.yaml.example +++ b/config/production.yaml.example @@ -72,16 +72,17 @@ trending: # Once you have defined your strategies, choose which instances you want to cache in admin -> manage follows -> following redundancy: videos: -# - -# size: '10GB' -# strategy: 'most-views' # Cache videos that have the most views -# - -# size: '10GB' -# strategy: 'trending' # Cache trending videos -# - -# size: '10GB' -# strategy: 'recently-added' # Cache recently added videos -# minViews: 10 # Having at least x views + strategies: +# - +# size: '10GB' +# strategy: 'most-views' # Cache videos that have the most views +# - +# size: '10GB' +# strategy: 'trending' # Cache trending videos +# - +# size: '10GB' +# strategy: 'recently-added' # Cache recently added videos +# minViews: 10 # Having at least x views ############################################################################### # diff --git a/config/test.yaml b/config/test.yaml index d3e0e49ac..d36d90bbd 100644 --- a/config/test.yaml +++ b/config/test.yaml @@ -23,16 +23,17 @@ log: redundancy: videos: - - - size: '10MB' - strategy: 'most-views' - - - size: '10MB' - strategy: 'trending' - - - size: '10MB' - strategy: 'recently-added' - minViews: 1 + strategies: + - + size: '10MB' + strategy: 'most-views' + - + size: '10MB' + strategy: 'trending' + - + size: '10MB' + strategy: 'recently-added' + minViews: 1 cache: previews: -- cgit v1.2.3 From f9f899b9f803eb5159a67781f10649a0cf040677 Mon Sep 17 00:00:00 2001 From: Chocobozzz Date: Wed, 19 Sep 2018 16:21:09 +0200 Subject: Add redundancy check interval in config --- config/default.yaml | 1 + config/production.yaml.example | 1 + config/test.yaml | 1 + 3 files changed, 3 insertions(+) (limited to 'config') diff --git a/config/default.yaml b/config/default.yaml index 00eeaea8c..fa1fb628a 100644 --- a/config/default.yaml +++ b/config/default.yaml @@ -71,6 +71,7 @@ trending: # Once you have defined your strategies, choose which instances you want to cache in admin -> manage follows -> following redundancy: videos: + check_interval: '1 hour' # How often you want to check new videos to cache strategies: # - # size: '10GB' diff --git a/config/production.yaml.example b/config/production.yaml.example index 28770e480..4d8752206 100644 --- a/config/production.yaml.example +++ b/config/production.yaml.example @@ -72,6 +72,7 @@ trending: # Once you have defined your strategies, choose which instances you want to cache in admin -> manage follows -> following redundancy: videos: + check_interval: '1 hour' # How often you want to check new videos to cache strategies: # - # size: '10GB' diff --git a/config/test.yaml b/config/test.yaml index d36d90bbd..ad94b00cd 100644 --- a/config/test.yaml +++ b/config/test.yaml @@ -23,6 +23,7 @@ log: redundancy: videos: + check_interval: '5 seconds' strategies: - size: '10MB' -- cgit v1.2.3