@nger/fk-upload 1.0.165 → 1.0.168

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.
@@ -50,7 +50,7 @@ let AddTaskController = class AddTaskController {
50
50
  react_1.default.createElement("input", { type: "text", onChange: e => { }, name: "we7Username", value: data.username, className: 'form-control', id: "w7Username" })),
51
51
  react_1.default.createElement("div", { className: "form-group" },
52
52
  react_1.default.createElement("label", { htmlFor: "w7Username" }, "topicId"),
53
- react_1.default.createElement("input", { type: "text", onChange: e => { }, name: "topicId", value: "{data.id}", className: 'form-control', id: "topicId" })),
53
+ react_1.default.createElement("input", { type: "text", onChange: e => { }, name: "topicId", value: data.id, className: 'form-control', id: "topicId" })),
54
54
  react_1.default.createElement("div", { className: "form-group" },
55
55
  react_1.default.createElement("button", { type: "submit", className: "btn btn-primary" }, "\u63D0\u4EA4"),
56
56
  react_1.default.createElement("button", { type: "reset", className: "btn" }, "\u91CD\u7F6E"))));
@@ -166,7 +166,7 @@ let FkService = class FkService {
166
166
  ...headers,
167
167
  Cookie: task.cookies
168
168
  },
169
- timeout: 8000
169
+ timeout: 18000
170
170
  }).then(res => {
171
171
  return res.data;
172
172
  }).catch((e) => {
@@ -38,7 +38,8 @@ class UploadTask extends rabbitmq_1.Task {
38
38
  return next && next();
39
39
  }
40
40
  if (!(0, fs_1.existsSync)(task.path)) {
41
- throw new Error(`file ${task.path} not found`);
41
+ fail();
42
+ return next && next();
42
43
  }
43
44
  // > 1G give up
44
45
  if (task.total >= 1024 * 1024 * 1024) {
@@ -49,7 +50,8 @@ class UploadTask extends rabbitmq_1.Task {
49
50
  const localSize = fk.getLocalSize(old.path);
50
51
  if (cloudSize != localSize) {
51
52
  // not my task
52
- throw new Error(`not mine task`);
53
+ fail();
54
+ return next && next();
53
55
  // await db.manager.update(FkDownloadTaskEntity, task.filename, { status: 0 })
54
56
  // const download = await taskService.createDownLoadTask(old.url, old.loginId, old.topicId);
55
57
  // await manager.send(download);
@@ -76,7 +78,8 @@ class UploadTask extends rabbitmq_1.Task {
76
78
  this.errorCount = 0;
77
79
  }
78
80
  this.errorCount += 1;
79
- throw e;
81
+ fail();
82
+ return next && next();
80
83
  });
81
84
  }
82
85
  else {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nger/fk-upload",
3
- "version": "1.0.165",
3
+ "version": "1.0.168",
4
4
  "description": "nger fk upload",
5
5
  "main": "dist/electon.js",
6
6
  "types": "dist/core.d.ts",