def _initialize_values():
    logger.info('Fetch all rows from the job priority table.')
    # Get all rows of job priorities
    jp_index = job_priority_index(JobPriority.objects.all())
    if jp_index:
        # For 2 weeks the job will be considered high value (priority=1)
        return jp_index, SETA_HIGH_VALUE_PRIORITY, _two_weeks_from_now()
    else:
        # When the table is empty it means that we're starting the system for the first time
        # and we're going to use a different set of default values
        # All job priorities will be marked as low value jobs
        # If information to determine job failures is available, the jobs will quickly be turned
        # into high value jobs.
        return jp_index, SETA_LOW_VALUE_PRIORITY, None
Ejemplo n.º 2
0
def _initialize_values():
    logger.info('Fetch all rows from the job priority table.')
    # Get all rows of job priorities
    jp_index = job_priority_index(JobPriority.objects.all())
    if jp_index:
        # For 2 weeks the job will be considered high value (priority=1)
        return jp_index, SETA_HIGH_VALUE_PRIORITY, _two_weeks_from_now()
    else:
        # When the table is empty it means that we're starting the system for the first time
        # and we're going to use a different set of default values
        # All job priorities will be marked as low value jobs
        # If information to determine job failures is available, the jobs will quickly be turned
        # into high value jobs.
        return jp_index, SETA_LOW_VALUE_PRIORITY, None
Ejemplo n.º 3
0
def _initialize_values():
    logger.info('Fetch all rows from the job priority table.')
    # Get all rows of job priorities
    jp_index = job_priority_index(JobPriority.objects.all())
    return jp_index, SETA_LOW_VALUE_PRIORITY, None
Ejemplo n.º 4
0
def jp_index_fixture(job_priority_list):
    return job_priority_index(job_priority_list)
Ejemplo n.º 5
0
def _initialize_values():
    logger.info('Fetch all rows from the job priority table.')
    # Get all rows of job priorities
    jp_index = job_priority_index(JobPriority.objects.all())
    return jp_index, SETA_LOW_VALUE_PRIORITY, None
Ejemplo n.º 6
0
def jp_index_fixture(job_priority_list):
    return job_priority_index(job_priority_list)