{"action":"opened","issue":{"url":"https://api.github.com/repos/JacksonTian/eventproxy/issues/88","repository_url":"https://api.github.com/repos/JacksonTian/eventproxy","labels_url":"https://api.github.com/repos/JacksonTian/eventproxy/issues/88/labels{/name}","comments_url":"https://api.github.com/repos/JacksonTian/eventproxy/issues/88/comments","events_url":"https://api.github.com/repos/JacksonTian/eventproxy/issues/88/events","html_url":"https://github.com/JacksonTian/eventproxy/issues/88","id":325623788,"number":88,"title":"after  乱序           返回数据的顺序没有按照执行顺序进行","user":{"login":"dinghao1994","id":7079487,"avatar_url":"https://avatars0.githubusercontent.com/u/7079487?v=4","gravatar_id":"","url":"https://api.github.com/users/dinghao1994","html_url":"https://github.com/dinghao1994","followers_url":"https://api.github.com/users/dinghao1994/followers","following_url":"https://api.github.com/users/dinghao1994/following{/other_user}","gists_url":"https://api.github.com/users/dinghao1994/gists{/gist_id}","starred_url":"https://api.github.com/users/dinghao1994/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dinghao1994/subscriptions","organizations_url":"https://api.github.com/users/dinghao1994/orgs","repos_url":"https://api.github.com/users/dinghao1994/repos","events_url":"https://api.github.com/users/dinghao1994/events{/privacy}","received_events_url":"https://api.github.com/users/dinghao1994/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2018-05-23T09:31:34Z","updated_at":"2018-05-23T09:31:34Z","closed_at":null,"author_association":"NONE","body":"` for (var i = 0; i < sqlarray.length; i++) {\r\n  dbHandler(sqlarray[i],function(err,data){\r\n    if(err) throw err;\r\n    let   result  =  data[0].result ;\r\n    if(result == null ){\r\n      result  = 0;\r\n    }\r\n    if(result  < 0 ){\r\n      result  =  Math.abs(result);\r\n    }\r\n    ep.emit('queryDb', result);\r\n  });\r\n  }\r\n\r\n    // 在所有文件的异步执行结束后将被执行\r\n  ep.after('queryDb', sqlarray.length, function (list) {\r\n    console.log(list);\r\n  res.status(200).json({\"result\":list});\r\n    // 所有文件的内容都存在list数组中\r\n  });`\r\n\r\n\r\n这样之后，每次查询返回的数据顺序都不同。"}}
{"actor":{"display_login":"dinghao1994"}}