|
@@ -30,10 +30,19 @@ export class BackgroundTaskProcessor {
|
|
|
});
|
|
|
|
|
|
// TODO: what if there is no asset.resizePath. Should fail the Job?
|
|
|
+ // => panoti report: Job not fail
|
|
|
if (asset.resizePath) {
|
|
|
fs.unlink(asset.resizePath, (err) => {
|
|
|
if (err) {
|
|
|
- console.log('error deleting ', asset.originalPath);
|
|
|
+ console.log('error deleting ', asset.resizePath);
|
|
|
+ }
|
|
|
+ });
|
|
|
+ }
|
|
|
+
|
|
|
+ if (asset.webpPath) {
|
|
|
+ fs.unlink(asset.webpPath, (err) => {
|
|
|
+ if (err) {
|
|
|
+ console.log('error deleting ', asset.webpPath);
|
|
|
}
|
|
|
});
|
|
|
}
|