Ejemplo n.º 1
0
def create_failure_lines(repository, job_guid, failure_line_list):
    failure_lines = []
    for i, (base_data, updates) in enumerate(failure_line_list):
        data = {"job_guid": job_guid,
                "repository": repository,
                "line": i}
        data.update(base_data)
        data.update(updates)
        failure_line = FailureLine(**data)
        failure_line.save()
        failure_lines.append(failure_line)

    return failure_lines
Ejemplo n.º 2
0
def create_failure_lines(repository, job_guid, failure_line_list):
    failure_lines = []
    for i, (base_data, updates) in enumerate(failure_line_list):
        data = {"job_guid": job_guid,
                "repository": repository,
                "line": i}
        data.update(base_data)
        data.update(updates)
        failure_line = FailureLine(**data)
        failure_line.save()
        failure_lines.append(failure_line)

    return failure_lines
Ejemplo n.º 3
0
def create_failure_lines(job, failure_line_list, start_line=0):
    failure_lines = []
    for i, (base_data, updates) in enumerate(failure_line_list[start_line:]):
        data = {
            "job_guid": job.guid,
            "repository": job.repository,
            "line": i + start_line
        }
        data.update(base_data)
        data.update(updates)
        failure_line = FailureLine(**data)
        failure_line.save()
        failure_lines.append(failure_line)

    return failure_lines
Ejemplo n.º 4
0
def create_failure_lines(job, failure_line_list,
                         start_line=0):
    failure_lines = []
    for i, (base_data, updates) in enumerate(failure_line_list[start_line:]):
        data = {"job_guid": job.guid,
                "repository": job.repository,
                "line": i + start_line}
        data.update(base_data)
        data.update(updates)
        failure_line = FailureLine(**data)
        failure_line.save()
        failure_line.elastic_search_insert()
        failure_lines.append(failure_line)

    refresh_all()

    return failure_lines
Ejemplo n.º 5
0
def create_failure_lines(job, failure_line_list, start_line=0):
    failure_lines = []
    for i, (base_data, updates) in enumerate(failure_line_list[start_line:]):
        data = {"job_guid": job.guid, "repository": job.repository, "line": i + start_line}
        data.update(base_data)
        data.update(updates)
        failure_line = FailureLine(**data)
        job_log = JobLog.objects.create(
            job=job,
            name='{}{}'.format(base_data.get('test'), job.id),
            url='bar{}'.format(i),
            status=1,
        )
        print('create jobLog for job id: {}'.format(job.id))
        failure_line.job_log = job_log
        failure_line.save()
        failure_lines.append(failure_line)

    return failure_lines
Ejemplo n.º 6
0
def create_failure_lines(job, failure_line_list, start_line=0):
    failure_lines = []
    for i, (base_data, updates) in enumerate(failure_line_list[start_line:]):
        data = {
            "job_guid": job.guid,
            "repository": job.repository,
            "line": i + start_line
        }
        data.update(base_data)
        data.update(updates)
        failure_line = FailureLine(**data)
        failure_line.save()
        failure_line.elastic_search_insert()
        failure_lines.append(failure_line)

    if settings.ELASTICSEARCH_URL:
        refresh_index()

    return failure_lines
Ejemplo n.º 7
0
def create_failure_lines(repository,
                         job_guid,
                         failure_line_list,
                         start_line=0):
    failure_lines = []
    for i, (base_data, updates) in enumerate(failure_line_list[start_line:]):
        data = {
            "job_guid": job_guid,
            "repository": repository,
            "line": i + start_line
        }
        data.update(base_data)
        data.update(updates)
        failure_line = FailureLine(**data)
        failure_line.save()
        failure_line.elastic_search_insert()
        failure_lines.append(failure_line)

    refresh_all()

    return failure_lines