这段代码直接取自以下示例:https://github.com/caolan/async#seriestasks-callback
var async = require("async");
async.series([
function() { console.log("a"); },
function() { console.log("b"); }
], function(err, results){
console.log(err);
console.log(results);
});
Run Code Online (Sandbox Code Playgroud)
但它不起作用.打印"a"后停止.
它是最新版本的异步模块的错误还是我的用法有问题?
我刚刚设置了三个节点的副本集。第三个节点通过“ optimeDate”:ISODate(“ 1970-01-01T00:00:00Z”)卡在stateStr STARTUP2上。但是,它没有显示错误消息。这样好吗 在主要rs.status()上
{
"set" : "qdit",
"date" : ISODate("2013-06-18T22:49:41Z"),
"myState" : 1,
"members" : [
{
"_id" : 0,
"name" : "q.example.com:27017",
"health" : 1,
"state" : 1,
"stateStr" : "PRIMARY",
"uptime" : 2940,
"optime" : {
"t" : 1371593311,
"i" : 1
},
"optimeDate" : ISODate("2013-06-18T22:08:31Z"),
"self" : true
},
{
"_id" : 1,
"name" : "q1.example.com:27017",
"health" : 1,
"state" : 2,
"stateStr" : "SECONDARY",
"uptime" : 457,
"optime" : {
"t" : 1371593311,
"i" …Run Code Online (Sandbox Code Playgroud)