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
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
def jp_index_fixture(job_priority_list): return job_priority_index(job_priority_list)