addTaskByTemplate(id, params) {
    const task = this.temps[id];
    const tid = this.taskQueue.push({ task, params });
    if (this.state === 'free') this.start();

    return tid;
  }
Add a production task by template
@param {string} tempid - a template id
@public