@nger/fk-upload 1.0.158 → 1.0.161
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.
@@ -167,7 +167,7 @@ let TaskManageController = class TaskManageController {
|
|
167
167
|
react_1.default.createElement("td", null, task.filename),
|
168
168
|
react_1.default.createElement("td", null, getStatusTitle(task.status)),
|
169
169
|
react_1.default.createElement("td", null,
|
170
|
-
Math.ceil(100 * task.
|
170
|
+
Math.ceil(100 * task.totalSize / (1024 * 1024 * 1024)) / 100,
|
171
171
|
"G"),
|
172
172
|
react_1.default.createElement("td", null, task.isBigFile ? 'big' : 'small'),
|
173
173
|
react_1.default.createElement("td", { id: task.filename + '-upload-url' },
|
@@ -27,7 +27,7 @@ class DownloadTask extends rabbitmq_1.Task {
|
|
27
27
|
const complete = injector.get(rabbitmq_1.COMPLETE);
|
28
28
|
const fail = injector.get(rabbitmq_1.FAIL);
|
29
29
|
const download = await db.manager.findOne(entities_1.FkDownloadTaskEntity, { where: { filename: task.filename } });
|
30
|
-
if (download.status !== 0) {
|
30
|
+
if (!download || (download && download.status !== 0)) {
|
31
31
|
await complete();
|
32
32
|
return next && next();
|
33
33
|
}
|
@@ -36,7 +36,7 @@ class ScheduleTask extends rabbitmq_1.Task {
|
|
36
36
|
const year = now.getFullYear();
|
37
37
|
const month = now.getMonth();
|
38
38
|
const day = now.getDate();
|
39
|
-
const date = new Date(`${year}-${month}-${day}`);
|
39
|
+
const date = new Date(`${year}-${month + 1}-${day}`);
|
40
40
|
const nowTime = Math.floor(date.getTime() / 1000);
|
41
41
|
const where = {
|
42
42
|
uniacid: (0, typeorm_2.In)(uniacids),
|