]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blobdiff - shared/extra-utils/server/servers-command.ts
Optimize torrent URL update
[github/Chocobozzz/PeerTube.git] / shared / extra-utils / server / servers-command.ts
index 40a11e8d7f160843699e4be21d88716ea9ebd236..776d2123c20aba0757080e176ca7a9f9590cc211 100644 (file)
@@ -55,7 +55,7 @@ export class ServersCommand extends AbstractCommand {
   }
 
   async waitUntilLog (str: string, count = 1, strictCount = true) {
-    const logfile = this.server.servers.buildDirectory('logs/peertube.log')
+    const logfile = this.buildDirectory('logs/peertube.log')
 
     while (true) {
       const buf = await readFile(logfile)
@@ -80,6 +80,10 @@ export class ServersCommand extends AbstractCommand {
     return this.buildDirectory(join('streaming-playlists', 'hls', videoUUID, basename(fileUrl)))
   }
 
+  getLogContent () {
+    return readFile(this.buildDirectory('logs/peertube.log'))
+  }
+
   async getServerFileSize (subPath: string) {
     const path = this.server.servers.buildDirectory(subPath)