@nger/fk-upload 1.0.193 → 1.0.196
Sign up to get free protection for your applications and to get access to all the features.
@@ -167,7 +167,7 @@ let TaskManageController = class TaskManageController {
|
|
167
167
|
status: where.status,
|
168
168
|
...query
|
169
169
|
})}`;
|
170
|
-
const finishUrl = (filename) => `/@nger/fk-upload/finish-task?filename=${filename}&callback=${encodeURIComponent(finishCallback)}`;
|
170
|
+
const finishUrl = (filename) => `/@nger/fk-upload/finish-task?filename=${encodeURIComponent(filename)}&callback=${encodeURIComponent(finishCallback)}`;
|
171
171
|
const logins = await this.db.manager.find(entities_1.FkLoginEntity, { where: {} });
|
172
172
|
const getLogin = (id) => {
|
173
173
|
return logins.find(it => it.fkLoginId = id);
|
@@ -270,12 +270,10 @@ let TaskManageController = class TaskManageController {
|
|
270
270
|
async finishTask(filename, callback, ctx) {
|
271
271
|
if (filename) {
|
272
272
|
const item = this.db.manager.findOne(entities_1.FkDownloadTaskEntity, { where: { filename } });
|
273
|
+
console.log({ filename, callback });
|
273
274
|
if (item) {
|
274
275
|
await this.db.manager.update(entities_1.FkDownloadTaskEntity, filename, { status: 3 });
|
275
276
|
}
|
276
|
-
else {
|
277
|
-
console.log({ filename, callback });
|
278
|
-
}
|
279
277
|
}
|
280
278
|
ctx.redirect(callback);
|
281
279
|
}
|
@@ -32,12 +32,8 @@ class ScheduleTask extends rabbitmq_1.Task {
|
|
32
32
|
const uniacids = uniAccounts.map(a => a.uniacid);
|
33
33
|
const tasks = await db.manager.find(entities_1.FkDownloadTaskEntity, { select: ['topicId'] });
|
34
34
|
const ids = tasks.map(task => task.topicId);
|
35
|
-
const now = new Date();
|
36
|
-
const
|
37
|
-
const month = now.getMonth();
|
38
|
-
const day = now.getDate();
|
39
|
-
const date = new Date(`${year}-${month + 1}-${day}`);
|
40
|
-
const nowTime = Math.floor(date.getTime() / 1000);
|
35
|
+
const now = new Date().getTime() - 1000 * 60 * 60 * 24;
|
36
|
+
const nowTime = Math.floor(now / 1000);
|
41
37
|
const where = {
|
42
38
|
uniacid: (0, typeorm_2.In)(uniacids),
|
43
39
|
createTime: (0, typeorm_2.MoreThan)(nowTime)
|