tasks/hook.js
function(action, weight) {
      if(weight===undefined) {
        weight=0;
      }
      this.tasks.push({ name: action, weight: weight});
    }
function(action, weight) {
      if(weight===undefined) {
        weight=0;
      }
      this.tasks.push({ name: action, weight: weight});
    }
function ( action , weight ) { if ( weight === undefined ) { weight = 0 ; } this . tasks . push ( { name : action , weight : weight } ) ; }
Push new task
@param action
@param weight
Push new task