@nger/fk-upload 1.0.127 → 1.0.130

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.
@@ -12,5 +12,6 @@ export declare class FkDownloadTaskEntity {
12
12
  fileMd5: string;
13
13
  topicId: number;
14
14
  createDate: Date;
15
+ updateDate: Date;
15
16
  isBigFile: boolean;
16
17
  }
@@ -17,6 +17,7 @@ let FkDownloadTaskEntity = class FkDownloadTaskEntity {
17
17
  fileMd5;
18
18
  topicId;
19
19
  createDate;
20
+ updateDate;
20
21
  isBigFile;
21
22
  };
22
23
  tslib_1.__decorate([
@@ -96,6 +97,12 @@ tslib_1.__decorate([
96
97
  }),
97
98
  tslib_1.__metadata("design:type", Date)
98
99
  ], FkDownloadTaskEntity.prototype, "createDate", void 0);
100
+ tslib_1.__decorate([
101
+ (0, typeorm_1.UpdateDateColumn)({
102
+ name: 'update_date'
103
+ }),
104
+ tslib_1.__metadata("design:type", Date)
105
+ ], FkDownloadTaskEntity.prototype, "updateDate", void 0);
99
106
  tslib_1.__decorate([
100
107
  (0, typeorm_1.Column)({
101
108
  default: false
@@ -45,7 +45,7 @@ class EffectTask extends rabbitmq_1.Task {
45
45
  await (0, fs_extra_1.unlink)(task.path);
46
46
  }
47
47
  catch (e) { }
48
- await w7.manager.update(w7_1.W7ChatTopicEntity, task.topicId, { foreverUrl: task.uploadUrl }).then(() => complete()).catch(() => fail());
48
+ await w7.manager.update(w7_1.W7ChatTopicEntity, task.topicId, { foreverUrl: task.uploadUrl });
49
49
  await complete();
50
50
  }
51
51
  else {
@@ -64,6 +64,7 @@ class UploadTask extends rabbitmq_1.Task {
64
64
  }).catch(async (e) => {
65
65
  console.log(`upload error ${this.errorCount}`, e.message);
66
66
  if (e.message === 'to big') {
67
+ await db.manager.update(entities_1.FkDownloadTaskEntity, task.filename, { isBigFile: true });
67
68
  return complete();
68
69
  }
69
70
  if (this.errorCount > 10) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nger/fk-upload",
3
- "version": "1.0.127",
3
+ "version": "1.0.130",
4
4
  "description": "",
5
5
  "main": "dist/core.js",
6
6
  "types": "dist/core.d.ts",