'Start the continuous parsing of self.resultdir. This sets up
the database connection and inserts the basic job object into
the database if necessary.'

def init_parser(self):

    if (not self._using_parser):
        return
    self.parser = status_lib.parser(self._STATUS_VERSION)
    self.job_model = self.parser.make_job(self.resultdir)
    self.parser.start(self.job_model)
    job_idx = models_utils.job_get_idx_by_tag(self._parse_job)
    if (job_idx is None):
        dbutils.insert_job(self._parse_job, self.job_model)
    else:
        machine_idx = models_utils.machine_get_idx_by_hostname(self.job_model.machine)
        self.job_model.index = job_idx
        self.job_model.machine_idx = machine_idx
