Only delete image job after time limit if it's finished
This commit is contained in:
parent
7bd3fc2791
commit
e33d7fca5b
1 changed files with 1 additions and 1 deletions
|
@ -15,7 +15,7 @@ class JobCache extends Map {
|
|||
set(key, value) {
|
||||
super.set(key, value);
|
||||
setTimeout(() => {
|
||||
if (super.has(key) && this.get(key) === value) super.delete(key);
|
||||
if (super.has(key) && this.get(key) === value && value.data) super.delete(key);
|
||||
}, 300000); // delete jobs if not requested after 5 minutes
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue