Coding standards
Security in ResourceSpace
Developer reference
Database
Action functions
Admin functions
Ajax functions
Annotation functions
API functions
Collections functions
Comment functions
Config functions
CSV export functions
Dash functions
Debug functions
Encryption functions
Facial recognition functions
File functions
General functions
Language functions
Log functions
Login functions
Message functions
Migration functions
Node functions
PDF functions
Plugin functions
Render functions
Reporting functions
Request functions
Research functions
Slideshow functions
Theme permission functions
User functions
Video functions
Database functions
Metadata functions
Resource functions
Search functions
Map functions
Job functions
Tab functions
Test 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 385 to 414

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 8th December 2024 09:35 Europe/London time based on the source file dated 18th October 2024 11:40 Europe/London time.