0

websockets 経由で JSON データを受信するとき、このデータを meteor 内の mongodb にフィードしようとしています。JSON データは正常に取得されていますが、データがデータベースに既に存在するかどうかを確認しようとすると、エラーが発生し続けます: "[ 'Parse error: Can\'t wait without a fiber' ]'.

binance.websockets.miniTicker(markets => {
      //we've got the live information from binance
      if (db.Coins.find({}).count() === 0) {
        //if there's nothing in the database right now
        markets.forEach(function(coin) {
          //for each coin in the JSON file, create a new document
          db.Coins.insert(coin);
        });
      }
    });

これを解決するために誰かが私を正しい方向に向けることができますか?

どうもありがとう、ルーファス

4

1 に答える 1