@soga/uploader 0.2.50 → 0.2.51
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.
package/dist/hooks/complete.js
CHANGED
|
@@ -181,7 +181,6 @@ async function complete({ file_id, sdk_domain, fileRepository, }) {
|
|
|
181
181
|
info: {},
|
|
182
182
|
};
|
|
183
183
|
const data = file.ali_upload_result;
|
|
184
|
-
console.log('part_map: ', Object.keys(partMap));
|
|
185
184
|
Object.keys(partMap).forEach((filename) => {
|
|
186
185
|
const result = data[filename];
|
|
187
186
|
manifest.ali.info[filename] = {
|
|
@@ -34,8 +34,7 @@ class AliUploader extends base_1.BaseUploader {
|
|
|
34
34
|
await this.onPartProgress(event);
|
|
35
35
|
});
|
|
36
36
|
port2.on('error', (evt) => {
|
|
37
|
-
|
|
38
|
-
console.log(evt);
|
|
37
|
+
throw new Error('Ali upload part error');
|
|
39
38
|
});
|
|
40
39
|
const params = {
|
|
41
40
|
file_id,
|
|
@@ -33,9 +33,8 @@ class BaiduUploader extends base_1.BaseUploader {
|
|
|
33
33
|
port2.on('message', async (event) => {
|
|
34
34
|
await this.onPartProgress(event);
|
|
35
35
|
});
|
|
36
|
-
port2.on('error',
|
|
37
|
-
|
|
38
|
-
console.log(evt);
|
|
36
|
+
port2.on('error', (evt) => {
|
|
37
|
+
throw new Error('Baidu upload part error');
|
|
39
38
|
});
|
|
40
39
|
const params = {
|
|
41
40
|
file_id,
|
|
@@ -66,15 +65,12 @@ class BaiduUploader extends base_1.BaseUploader {
|
|
|
66
65
|
}
|
|
67
66
|
}
|
|
68
67
|
catch (error) {
|
|
69
|
-
console.log('error_name: ', error.name);
|
|
70
68
|
if (error.name == 'AbortError') {
|
|
71
69
|
await this.partRepository.update(part.id, {
|
|
72
70
|
upload_status: types_1.UploadStatus.NULL,
|
|
73
71
|
});
|
|
74
72
|
}
|
|
75
73
|
else {
|
|
76
|
-
console.log('baidu upload part error: ');
|
|
77
|
-
console.log(error);
|
|
78
74
|
await this.onPartError({
|
|
79
75
|
error,
|
|
80
76
|
part_id: part.id,
|
|
@@ -334,7 +334,6 @@ class BaseUploader {
|
|
|
334
334
|
await this.checkProcessingFile(file);
|
|
335
335
|
}
|
|
336
336
|
}
|
|
337
|
-
console.log('exception time1: ', Date.now() - time1);
|
|
338
337
|
const time2 = Date.now();
|
|
339
338
|
const parts = await this.partRepository.findBy({
|
|
340
339
|
uid: this.baseParams.uid,
|
|
@@ -349,7 +348,6 @@ class BaseUploader {
|
|
|
349
348
|
});
|
|
350
349
|
if (exception_parts.length) {
|
|
351
350
|
const ids = exception_parts.map((part) => part.id);
|
|
352
|
-
console.log('exception ids: ', ids);
|
|
353
351
|
await this.partRepository.update({
|
|
354
352
|
id: (0, typeorm_1.In)(ids),
|
|
355
353
|
upload_status: types_1.UploadStatus.PROCESS,
|
|
@@ -358,7 +356,6 @@ class BaseUploader {
|
|
|
358
356
|
});
|
|
359
357
|
}
|
|
360
358
|
}
|
|
361
|
-
console.log('exception time2: ', Date.now() - time2);
|
|
362
359
|
const real_count = this.threads.length;
|
|
363
360
|
const def_count = this.thread_count;
|
|
364
361
|
if (real_count < def_count) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@soga/uploader",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.51",
|
|
4
4
|
"publishConfig": {
|
|
5
5
|
"access": "public"
|
|
6
6
|
},
|
|
@@ -49,11 +49,11 @@
|
|
|
49
49
|
},
|
|
50
50
|
"dependencies": {
|
|
51
51
|
"@soga/entities": "^0.2.50",
|
|
52
|
-
"@soga/part-uploader": "^0.2.
|
|
52
|
+
"@soga/part-uploader": "^0.2.51",
|
|
53
53
|
"@soga/sdk": "^0.2.48",
|
|
54
54
|
"@soga/types": "^0.2.48",
|
|
55
55
|
"@soga/utils": "^0.2.48",
|
|
56
56
|
"piscina": "^4.9.2"
|
|
57
57
|
},
|
|
58
|
-
"gitHead": "
|
|
58
|
+
"gitHead": "7832c2e2000522b1d0898ce6d01ceaf3f3ff05cc"
|
|
59
59
|
}
|