Skip to content

Commit

Permalink
去掉 splice log
Browse files Browse the repository at this point in the history
  • Loading branch information
carsonxu committed Dec 24, 2018
1 parent 9da3b71 commit 48d849b
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "cos-js-sdk-v5",
"version": "0.5.2",
"version": "0.5.3",
"description": "cos js sdk v5",
"main": "index.js",
"scripts": {
Expand Down
4 changes: 2 additions & 2 deletions src/task.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ var originApiMap = {};
var transferToTaskMethod = function (apiMap, apiName) {
originApiMap[apiName] = apiMap[apiName];
apiMap[apiName] = function (params, callback) {
if (params.SkipTask || !this.options.UploadQueueSize) {
if (params.SkipTask) {
originApiMap[apiName].call(this, params, callback);
} else {
this._addTask(apiName, params, callback);
Expand Down Expand Up @@ -53,7 +53,6 @@ var initTask = function (cos) {
i < nextUploadIndex; // 小于当前操作的 index 才处理
i++) {
if (!queue[i] || queue[i].state !== 'waiting') {
console.log('splice:', queue.length, i, queue[i] && queue[i].state);
queue.splice(i, 1);
nextUploadIndex--;
}
Expand Down Expand Up @@ -121,6 +120,7 @@ var initTask = function (cos) {
delete task.callback;
}
}
clearQueue();
};

cos._addTasks = function (taskList) {
Expand Down

0 comments on commit 48d849b

Please sign in to comment.