@nger/fk-upload 1.0.113 → 1.0.114
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,9 @@ let CheckUploadController = class CheckUploadController {
|
|
84
84
|
async checkWaitUploadTask() {
|
85
85
|
const download = this.db.manager.getRepository(fk_download_task_entity_1.FkDownloadTaskEntity);
|
86
86
|
const errors = await download.find({ where: { uploadUrl: (0, typeorm_2.Like)('https://site%') } });
|
87
|
-
|
87
|
+
if (errors && errors.length > 0) {
|
88
|
+
await download.update(errors.map(err => err.filename), { status: 1 });
|
89
|
+
}
|
88
90
|
const list = await download.find({ where: { status: 1, totalSize: (0, typeorm_2.LessThan)(1024 * 1024 * 1024) } });
|
89
91
|
const task = this.injector.get(task_service_1.TaskService);
|
90
92
|
await Promise.all(list.map(async (item) => {
|
@@ -75,6 +75,11 @@ class ScheduleTask extends rabbitmq_1.Task {
|
|
75
75
|
}
|
76
76
|
}
|
77
77
|
});
|
78
|
+
// check status = 1
|
79
|
+
const waitUploadTask = await db.manager.find(entities_1.FkDownloadTaskEntity, { where: { status: 1 } });
|
80
|
+
// waitUploadTask.map(task => {
|
81
|
+
// taskService.createUploadTask()
|
82
|
+
// })
|
78
83
|
};
|
79
84
|
await run();
|
80
85
|
schedule.scheduleJob(task.name, task.rule, async (time) => {
|