"use strict";


const debug = require("debug")("tester1");
const moment = require("moment");

class Controller1 extends require("../lib/controller.js") {
  constructor(param) {
    super(param);
    this.errprob = 0.01;
    this.collector = [];
    }
  errHandler(pos, err) {
    debug("error",err,pos);
    delete this.daten[pos.pos];
    if ( this.errcollector.size > 30 ){
      return true;
    } else {
      return false;
    }
  }
  objHandler(pos, obj,input) { //add timing
    //debug("hier da",pos,obj);
    /*
    this.collector[pos.id] = Object.assign(obj, {
      diff: process.hrtime(pos.start)
    }); //store endresult in order of start like Promise.all
*/
this.collector.push(input);

  }
  endHandler(){
    if (this.errcollector.size > 30) { //throw with error
      debug("finished with error %d", this.errcollector.size);
      this.emit("ende", [...this.errcollector.entries()]);
        } else { // return the array of results
      debug("finished with gen");
          this.emit("ende", null,this.collector);
    }

  }

  *
  dataGenerator(res) {
   let  now = moment.now("X");
    for (let i = 0; i < 30; i++) {

        if ( i> 0){
              yield* this.waiter(10000 - (moment.now("X") - now));
              debug("itermediatore",this.collector.length);
          res = this.collector;
          this.collector=[];

        }

      yield* this.startAll(res);

     now = moment.now("X");
    }


  }
}

module.exports=Controller1;

@@ -238,16 +238,418 @@
 r = %5B%5D;%0A
+    %0A        this.removed=%5B%5D;%0A    setInterval(this.checkRunning.bind(this),%0A      1000,  (entry)=%3E%7B%0A        //debug(%22longest%22,entry);%0A        if ( entry%5B0%5D.diff%5B0%5D%3E0 %7C%7C entry%5B0%5D.diff%5B1%5D%3E2e8 )%7B //runs to long%0A          debug(%22remove %25d%22,this.removed.length,entry%5B0%5D);%0A          this.removed.push( entry%5B1%5D);%0A          return true;%0A        %7D else %7B%0A         return false;%0A        %7D%0A%0A      %7D,1).unref();%0A%0A
     %7D%0A  

Update controller1.js