@nger/fk-upload 1.0.100 → 1.0.101

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.
@@ -64,6 +64,8 @@ class DownloadTask extends rabbitmq_1.Task {
64
64
  sub.complete();
65
65
  const fileMd5 = await (0, md5_file_1.default)(task.path);
66
66
  console.log(`file download success ${task.filename}: ${fileMd5}`);
67
+ const db = injector.get(typeorm_1.Db);
68
+ await db.manager.update(entities_1.FkDownloadTaskEntity, task.filename, { totalSize: total, fileMd5: fileMd5, status: 1, size: total });
67
69
  const uploadTask = await this.createUploadTask(task, total, fileMd5, injector);
68
70
  await manager.send(uploadTask);
69
71
  await complete();
@@ -82,8 +84,6 @@ class DownloadTask extends rabbitmq_1.Task {
82
84
  await next();
83
85
  }
84
86
  async createUploadTask(download, total, md5, injector) {
85
- const db = injector.get(typeorm_1.Db);
86
- await db.manager.update(entities_1.FkDownloadTaskEntity, download.filename, { totalSize: total, fileMd5: md5, status: 1, size: total });
87
87
  const fk = injector.get(fk_service_1.FkService);
88
88
  const info = await fk.getUploadInfo(download.loginId, download.filename, md5, total);
89
89
  if (info) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nger/fk-upload",
3
- "version": "1.0.100",
3
+ "version": "1.0.101",
4
4
  "description": "",
5
5
  "main": "dist/core.js",
6
6
  "types": "dist/core.d.ts",