]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blobdiff - server/helpers/core-utils.ts
Add timeout on youtube dl to cleaup files
[github/Chocobozzz/PeerTube.git] / server / helpers / core-utils.ts
index f5ef187fe73ccc29841e9b5786d8eb532de3d9ec..b1a27e089110d632604e5908506cc0961baffa46 100644 (file)
@@ -64,6 +64,10 @@ function isTestInstance () {
   return process.env.NODE_ENV === 'test'
 }
 
+function isProdInstance () {
+  return process.env.NODE_ENV === 'production'
+}
+
 function root () {
   // We are in /helpers/utils.js
   const paths = [ __dirname, '..', '..' ]
@@ -179,6 +183,8 @@ const createTorrentPromise = promisify2<string, any, any>(createTorrent)
 
 export {
   isTestInstance,
+  isProdInstance,
+
   root,
   escapeHTML,
   pageToStartAndCount,