From e669ff58736e919cbc300e1880d995006592fa0c Mon Sep 17 00:00:00 2001 From: Chocobozzz Date: Tue, 28 Jan 2020 13:57:04 +0100 Subject: [PATCH] Add redundancy CLI doc --- server/tests/cli/peertube.ts | 6 ++++++ support/doc/tools.md | 32 +++++++++++++++++++++++++++++++- 2 files changed, 37 insertions(+), 1 deletion(-) diff --git a/server/tests/cli/peertube.ts b/server/tests/cli/peertube.ts index 09cbcdb65..15b6755f2 100644 --- a/server/tests/cli/peertube.ts +++ b/server/tests/cli/peertube.ts @@ -277,6 +277,12 @@ describe('Test CLI wrapper', function () { expect(stdout).to.not.contain('super video') } }) + + after(async function () { + this.timeout(10000) + + await cleanupTests([ anotherServer ]) + }) }) after(async function () { diff --git a/support/doc/tools.md b/support/doc/tools.md index d5427b5b7..1f1e52c36 100644 --- a/support/doc/tools.md +++ b/support/doc/tools.md @@ -12,6 +12,7 @@ - [peertube-upload.js](#peertube-uploadjs) - [peertube-watch.js](#peertube-watchjs) - [peertube-plugins.js](#peertube-pluginsjs) + - [peertube-redundancy.js](#peertube-redundancyjs) - [Server tools](#server-tools) - [parse-log](#parse-log) - [create-transcoding-job.js](#create-transcoding-jobjs) @@ -77,7 +78,8 @@ You can access it as `peertube` via an alias in your `.bashrc` like `alias peert import-videos|import import a video from a streaming platform watch|w watch a video in the terminal ✩°。⋆ repl initiate a REPL to access internals - plugins|p [action] manag instance plugins + plugins|p [action] manage instance plugins + redundancy|r [action] manage video redundancies help [cmd] display help for [cmd] ``` @@ -200,6 +202,34 @@ $ node dist/server/tools/peertube-plugins.js install --path /my/plugin/path $ node dist/server/tools/peertube-plugins.js install --npm-name peertube-theme-example ``` +#### peertube-redundancy.js + +Manage (list/add/remove) video redundancies: + +To list your videos that are duplicated by remote instances: + +``` +$ node dist/server/tools/peertube.js redundancy list-remote-redundancies +``` + +To list remote videos that your instance duplicated: + +``` +$ node dist/server/tools/peertube.js redundancy list-my-redundancies +``` + +To duplicate a specific video in your redundancy system: + +``` +$ node dist/server/tools/peertube.js redundancy add --video 823 +``` + +To remove a video redundancy: + +``` +$ node dist/server/tools/peertube.js redundancy remove --video 823 +``` + ## Server tools These scripts should be run on the server, in `peertube-latest` directory.