merge_machine/api.py
def _choose_queue(job_name, project_id, data_params):
    '''
    Priority is low by default. It is high if specified in SCHEDULED_MODULES
    or if performing on a __MINI or file that doesn't have __MINI
    # TODO: MAKE impossible to overwrite metadata
    '''
    project_type = None
    if data_params is not None:
        project_type = data_params.get('project_type')
        
    if project_type is None:
        project_type = SCHEDULED_JOBS[job_name]['project_type']
    proj = _init_project(project_type=project_type, project_id=project_id)  

    if data_params and data_params is not None:
        if (project_type=='normalize') and (
                    (MINI_PREFIX in data_params['file_name']) 
                    or (not proj.metadata['has_mini'])):
            return 'high'
    
    return SCHEDULED_JOBS[job_name].get('priority', 'low')

    Priority is low by default. It is high if specified in SCHEDULED_MODULES
    or if performing on a __MINI or file that doesn't have __MINI
    # TODO: MAKE impossible to overwrite metadata
    
Priority is low by default. It is high if specified in SCHEDULED_MODULES
or if performing on a __MINI or file that doesn't have __MINI
TODO: MAKE impossible to overwrite metadata
Priority is low by default . It is high if specified in SCHEDULED_MODULES or if performing on a __MINI or file that doesn ' t have __MINI TODO : MAKE impossible to overwrite metadata
def _choose_queue(job_name, project_id, data_params):
    project_type = None
    if data_params is not None:
        project_type = data_params.get('project_type')
    if project_type is None:
        project_type = SCHEDULED_JOBS[job_name]['project_type']
    proj = _init_project(project_type=project_type, project_id=project_id)  
    if data_params and data_params is not None:
        if (project_type=='normalize') and (
                    (MINI_PREFIX in data_params['file_name']) 
                    or (not proj.metadata['has_mini'])):
            return 'high'
    return SCHEDULED_JOBS[job_name].get('priority', 'low')
def _choose_queue ( job_name , project_id , data_params ) : project_type = None if data_params is not None : project_type = data_params . get ( 'project_type' ) if project_type is None : project_type = SCHEDULED_JOBS [ job_name ] [ 'project_type' ] proj = _init_project ( project_type = project_type , project_id = project_id ) if data_params and data_params is not None : if ( project_type == 'normalize' ) and ( ( MINI_PREFIX in data_params [ 'file_name' ] ) or ( not proj . metadata [ 'has_mini' ] ) ) : return 'high' return SCHEDULED_JOBS [ job_name ] . get ( 'priority' , 'low' )
Priority is low by default.
Priority is low by default .
'''
    Priority is low by default. It is high if specified in SCHEDULED_MODULES
    or if performing on a __MINI or file that doesn't have __MINI
    # TODO: MAKE impossible to overwrite metadata
    '''
job_name
project_id
data_params