@nger/fk-upload 1.0.85 → 1.0.88

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -84,7 +84,7 @@ let CheckUploadController = class CheckUploadController {
84
84
  const download = this.db.manager.getRepository(fk_download_task_entity_1.FkDownloadTaskEntity);
85
85
  const errors = await download.find({ where: { uploadUrl: (0, typeorm_2.Like)('https://site%') } });
86
86
  await download.update(errors.map(err => err.filename), { status: 1 });
87
- const list = await download.find({ where: { status: 1 } });
87
+ const list = await download.find({ where: { status: 1, totalSize: (0, typeorm_2.LessThan)(1024 * 1024 * 1024) } });
88
88
  const task = this.injector.get(task_service_1.TaskService);
89
89
  await Promise.all(list.map(async (item) => {
90
90
  const upload = await task.createUploadTask({
@@ -30,7 +30,7 @@ class UploadTask extends rabbitmq_1.Task {
30
30
  await complete();
31
31
  return next && next();
32
32
  }
33
- if (!(0, fs_1.existsSync)(task.path) || (old.fileMd5 && old.fileMd5.length > 0)) {
33
+ if (!(0, fs_1.existsSync)(task.path) || !(old.fileMd5 && old.fileMd5.length > 0)) {
34
34
  await db.manager.update(entities_1.FkDownloadTaskEntity, task.filename, { status: 0 });
35
35
  await complete();
36
36
  return next && next();
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nger/fk-upload",
3
- "version": "1.0.85",
3
+ "version": "1.0.88",
4
4
  "description": "",
5
5
  "main": "dist/core.js",
6
6
  "types": "dist/core.d.ts",