projects
/
oweals
/
peertube.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
d22b9b3
)
Add tmp and redundancy directories to prune script
author
Chocobozzz
<me@florianbigard.com>
Thu, 6 Dec 2018 08:42:45 +0000
(09:42 +0100)
committer
Chocobozzz
<me@florianbigard.com>
Thu, 6 Dec 2018 08:42:45 +0000
(09:42 +0100)
scripts/prune-storage.ts
patch
|
blob
|
history
diff --git
a/scripts/prune-storage.ts
b/scripts/prune-storage.ts
index c0cd198f774d37e9de0e25f6527ce0d4749ebb18..f2be1b8ee98082ccd65d66b61a78db98ed53347f 100755
(executable)
--- a/
scripts/prune-storage.ts
+++ b/
scripts/prune-storage.ts
@@
-19,7
+19,8
@@
async function run () {
const storageOnlyOwnedToPrune = [
CONFIG.STORAGE.VIDEOS_DIR,
- CONFIG.STORAGE.TORRENTS_DIR
+ CONFIG.STORAGE.TORRENTS_DIR,
+ CONFIG.STORAGE.REDUNDANCY_DIR
]
const storageForAllToPrune = [
@@
-36,6
+37,8
@@
async function run () {
toDelete = toDelete.concat(await pruneDirectory(directory, false))
}
+ toDelete = toDelete.concat(await readdir(CONFIG.STORAGE.TMP_DIR))
+
if (toDelete.length === 0) {
console.log('No files to delete.')
return