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

job_queue_purge()

Description

Delete all jobs in the specified state

Parameters

ColumnTypeDefaultDescription
$status int 0 to purge, whole queue will be purged if not set

Return

void

Location

include/job_functions.php lines 238 to 251

Definition

 
function job_queue_purge($status=0)
    {
    
$deletejobs job_queue_get_jobs('',$status == '' $status);
    if(
count($deletejobs) > 0)
        {
        
$deletejobs_sql job_queue_get_jobs('',$status == '' $status,"","","priority","asc","",true);
        
ps_query(
            
"DELETE FROM job_queue 
                WHERE ref IN 
                    (SELECT jobs.ref FROM 
                        ( " 
$deletejobs_sql->sql ") AS jobs)"
            
,$deletejobs_sql->parameters);
        }
    }

This article was last updated 14th December 2024 17:35 Europe/London time based on the source file dated 18th October 2024 11:40 Europe/London time.