@nger/fk-upload 1.0.193 → 1.0.196

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
  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 year = now.getFullYear();
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)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nger/fk-upload",
3
- "version": "1.0.193",
3
+ "version": "1.0.196",
4
4
  "description": "nger fk upload",
5
5
  "main": "dist/electon.js",
6
6
  "types": "dist/core.d.ts",