smarter "clean remote files"
this should (optionally) skip in-use files, and files that have been seen recently
This commit is contained in:
parent
a4c0ef824c
commit
c68b8d6e7c
3 changed files with 49 additions and 19 deletions
|
|
@ -684,8 +684,11 @@ export class QueueService {
|
|||
}
|
||||
|
||||
@bindThis
|
||||
public createCleanRemoteFilesJob() {
|
||||
return this.objectStorageQueue.add('cleanRemoteFiles', {}, {
|
||||
public createCleanRemoteFilesJob(olderThanSeconds: number = 0, keepFilesInUse: boolean = false) {
|
||||
return this.objectStorageQueue.add('cleanRemoteFiles', {
|
||||
keepFilesInUse,
|
||||
olderThanSeconds,
|
||||
}, {
|
||||
removeOnComplete: {
|
||||
age: 3600 * 24 * 7, // keep up to 7 days
|
||||
count: 30,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue