-
Notifications
You must be signed in to change notification settings - Fork 143
Create Background Processing Infrastructure: Create perflab_start_background_job #480
Copy link
Copy link
Closed as not planned
Closed as not planned
Copy link
Labels
[Plugin] Performance LabIssue relates to work in the Performance Lab Plugin onlyIssue relates to work in the Performance Lab Plugin only[Plugin] Regenerate Existing ImagesIssues for the Regenerate Existing Images moduleIssues for the Regenerate Existing Images module
Description
Create a new perflab_start_background_job() function to start the background process for a specific job ID by making a HTTP POST request to the admin-ajax.php endpoint.
Acceptance Criteria
- Function accepts the following parameters
$job_id- A integer that is the ID for a job returned by theperflab_create_background_jobfunction
- The function will make a HTTP request to the
admin-ajax.phpendpoint with thewp_remote_postalong with the following parameters- action:
wp_ajax_background_process_handle_request - nonce:
wp_create_nonce( 'wp_ajax_background_process_handle_request' ) - timeout:
0.1 - data:
array( $job_id ) - blocking:
false - sslverify:
apply_filters( 'https_local_ssl_verify', false )
- action:
- The function will return the following depending on success or failure
- On failure the function returns the
WP_Errorfromwp_remote_post - On success, the function returns
true
- On failure the function returns the
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
[Plugin] Performance LabIssue relates to work in the Performance Lab Plugin onlyIssue relates to work in the Performance Lab Plugin only[Plugin] Regenerate Existing ImagesIssues for the Regenerate Existing Images moduleIssues for the Regenerate Existing Images module
Type
Fields
Give feedbackNo fields configured for issues without a type.