Create Background Processing Infrastructure: Create Status Cron Event #484
Labels
[Focus] Images
Issues related to the Images focus area
[Module] Regenerate Existing Images
Issues for the Regenerate Existing Images module
Performance Lab Plugin
Issue relates to work in the Performance Lab Plugin only
Projects
Create a Status Cron Event to check jobs are running correctly and remove old completed jobs.
Acceptance Criteria
Cron Schedule
timestamp
:time()
recurrence
:hourly
hook
:perflab_background_process_status_check
Event hook
Create a new function for the
perflab_background_process_status_check
hook that checks the followingCheck jobs are running correctly
get_terms
job_status
meta and the valuerunning
.job_lock
term meta valueini_get( 'max_execution_time' )
job_lock
meta exists and the value is less than themax_execution_time
continue to the next termjob_lock
meta does not exist or the value is greater themax_execution_time
restart the job by callingperflab_start_background_job
passing the$job_id
Remove old completed jobs
get_terms
job_status
meta and the valuecompleted
.job_completed_at
term meta valueThe text was updated successfully, but these errors were encountered: