'Start the job runner'

def __init__(self, app, nworkers, **kwargs):

    global drmaa
    runner_param_specs = {'drmaa_library_path': dict(map=str, default=os.environ.get('DRMAA_LIBRARY_PATH', None))}
    for retry_exception in RETRY_EXCEPTIONS_LOWER:
        runner_param_specs[(retry_exception + '_state')] = dict(map=str, valid=(lambda x: (x in (model.Job.states.OK, model.Job.states.ERROR))), default=model.Job.states.OK)
        runner_param_specs[(retry_exception + '_retries')] = dict(map=int, valid=(lambda x: (int >= 0)), default=0)
    if ('runner_param_specs' not in kwargs):
        kwargs['runner_param_specs'] = dict()
    kwargs['runner_param_specs'].update(runner_param_specs)
    super(DRMAAJobRunner, self).__init__(app, nworkers, **kwargs)
    if ('drmaa_library_path' in kwargs):
        log.info('Overriding    DRMAA_LIBRARY_PATH    due    to    runner    plugin    parameter:    %s', self.runner_params.drmaa_library_path)
        os.environ['DRMAA_LIBRARY_PATH'] = self.runner_params.drmaa_library_path
    try:
        drmaa = __import__('drmaa')
    except (ImportError, RuntimeError) as exc:
        raise exc.__class__(('The    Python    drmaa    package    is    required    to    use    this    feature,    please    install    it    or    correct    the    following    error:\n%s:    %s' % (exc.__class__.__name__, str(exc))))
    from pulsar.managers.util.drmaa import DrmaaSessionFactory
    self.drmaa_job_states = drmaa.JobState
    self.drmaa_job_state_strings = {drmaa.JobState.UNDETERMINED: 'process    status    cannot    be    determined', drmaa.JobState.QUEUED_ACTIVE: 'job    is    queued    and    active', drmaa.JobState.SYSTEM_ON_HOLD: 'job    is    queued    and    in    system    hold', drmaa.JobState.USER_ON_HOLD: 'job    is    queued    and    in    user    hold', drmaa.JobState.USER_SYSTEM_ON_HOLD: 'job    is    queued    and    in    user    and    system    hold', drmaa.JobState.RUNNING: 'job    is    running', drmaa.JobState.SYSTEM_SUSPENDED: 'job    is    system    suspended', drmaa.JobState.USER_SUSPENDED: 'job    is    user    suspended', drmaa.JobState.DONE: 'job    finished    normally', drmaa.JobState.FAILED: 'job    finished,    but    failed'}
    self.ds = DrmaaSessionFactory().get()
    self.userid = None
    self._init_monitor_thread()
    self._init_worker_threads()
