code: function () {
        var tasks = this.tasks.sort(function(a,b) {
          if (a.weight < b.weight) {
            return -1;
          } if (a.weight > b.weight) {
            return 1;
          }
          return 0;
        });
  
        var queue = [];
        for(var i=0;i<tasks.length; i+=1) {
          queue.push(tasks[i].name);
        }
        return queue;
      }
docs: Get all tasks ordered by weight
  @returns {Array}