コード例 #1
0
/**
 * Get all pending indexation jobs
 * @throws Exception
 * @return array
 */
function getPendingJobs()
{
    $jobs = SolrIndexationJob::fetchPendingList();
    if( ! count( $jobs ) > 0 )
    {
        throw new Exception( 'No pending job found' );
    }

    return $jobs;
}