Collections functions
General functions
Node functions
Render functions
Theme permission functions
User functions
Resource functions

get_job_type_priority()

Description

Get the default priority for a given job type

Parameters

ColumnTypeDefaultDescription
$type string "" Name of job type e.g. 'collection_download'

Return

int

Location

include/job_functions.php lines 379 to 408

Definition

 
function get_job_type_priority($type="")
    {
    if(
trim($type) != "")
        {
        switch (
trim($type))
            {
            case 
'collection_download':
            case 
'create_download_file':
            case 
'config_export':
            case 
'csv_metadata_export':
                return 
JOB_PRIORITY_USER;
                break;
            
            case 
'create_previews':
            case 
'extract_text':
            case 
'replace_batch_local':
            case 
'create_alt_file':
            case 
'delete_file':
            case 
'update_resource':
            case 
'upload_processing':
                return 
JOB_PRIORITY_SYSTEM;
                break;

            default:
                return 
JOB_PRIORITY_SYSTEM;
                break;
            }
        }
    return 
JOB_PRIORITY_SYSTEM;
    }

This article was last updated 19th March 2024 07:35 Europe/London time based on the source file dated 23rd February 2024 17:00 Europe/London time.