src/conrad.js
function _activateJob(job) {
    var l = _sortedByPriorityJobs.length;

    // Add the job to the running jobs:
    _runningJobs[job.id] = job;
    job.status = 'running';

    // Add the job to the priorities:
    if (l) {
      job.weightTime = _sortedByPriorityJobs[l - 1].weightTime;
      job.currentTime = job.weightTime * (job.weight || 1);
    }

    // Initialize the job and dispatch:
    job.startTime = __dateNow();
    _dispatch('jobStarted', __clone(job));

    _sortedByPriorityJobs.push(job);
  }
function _activateJob(job) {
    var l = _sortedByPriorityJobs.length;

    // Add the job to the running jobs:
    _runningJobs[job.id] = job;
    job.status = 'running';

    // Add the job to the priorities:
    if (l) {
      job.weightTime = _sortedByPriorityJobs[l - 1].weightTime;
      job.currentTime = job.weightTime * (job.weight || 1);
    }

    // Initialize the job and dispatch:
    job.startTime = __dateNow();
    _dispatch('jobStarted', __clone(job));

    _sortedByPriorityJobs.push(job);
  }
function _activateJob ( job ) { var l = _sortedByPriorityJobs . length ; // Add the job to the running jobs: _runningJobs [ job . id ] = job ; job . status = 'running' ; // Add the job to the priorities: if ( l ) { job . weightTime = _sortedByPriorityJobs [ l - 1 ] . weightTime ; job . currentTime = job . weightTime * ( job . weight || 1 ) ; } // Initialize the job and dispatch: job . startTime = __dateNow ( ) ; _dispatch ( 'jobStarted' , __clone ( job ) ) ; _sortedByPriorityJobs . push ( job ) ; }
Activates a job, by adding it to the _runningJobs object and the
_sortedByPriorityJobs array. It also initializes its currentTime value.

@param  {Object} job The job to activate.
Activates a job by adding it to the _runningJobs object and the _sortedByPriorityJobs array . It also initializes its currentTime value .