@nger/fk-upload 1.0.53 → 1.0.55
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.
@@ -5,6 +5,7 @@ const rabbitmq_1 = require("@nger/rabbitmq");
|
|
5
5
|
const actions_1 = require("./actions");
|
6
6
|
const typeorm_1 = require("@nger/typeorm");
|
7
7
|
const w7_1 = require("@nger/w7");
|
8
|
+
const entities_1 = require("../../entities");
|
8
9
|
class EffectTask extends rabbitmq_1.Task {
|
9
10
|
constructor() {
|
10
11
|
super(actions_1.EFFECT_ACTION);
|
@@ -15,7 +16,7 @@ class EffectTask extends rabbitmq_1.Task {
|
|
15
16
|
const fail = injector.get(rabbitmq_1.FAIL);
|
16
17
|
const w7 = injector.get(w7_1.W7DataSource);
|
17
18
|
const db = injector.get(typeorm_1.Db);
|
18
|
-
|
19
|
+
await db.manager.update(entities_1.FkDownloadTaskEntity, task.filename, { status: 3 });
|
19
20
|
// if (task.topicId) {
|
20
21
|
// await unlink(task.path);
|
21
22
|
// await w7.manager.update(W7ChatTopicEntity, task.topicId, { thirdUrl: task.uploadUrl }).then(() => complete()).catch(() => fail())
|
@@ -21,7 +21,7 @@ class UploadTask extends rabbitmq_1.Task {
|
|
21
21
|
const db = injector.get(typeorm_1.Db);
|
22
22
|
await fk.startUploadFile(task).then(async (res) => {
|
23
23
|
// create effect task
|
24
|
-
await db.manager.update(entities_1.FkDownloadTaskEntity, task.filename, { status: 2, uploadSize: task.total, uploadStatus: 1 });
|
24
|
+
await db.manager.update(entities_1.FkDownloadTaskEntity, task.filename, { status: 2, uploadUrl: task.uploadUrl, uploadSize: task.total, uploadStatus: 1 });
|
25
25
|
const effectTask = await taskService.createEffectTask(task.filename, task.uploadUrl, task.topicId, task.path);
|
26
26
|
return manager.send(effectTask).then(() => complete()).catch(() => fail());
|
27
27
|
}).catch(() => fail());
|