-
Notifications
You must be signed in to change notification settings - Fork 131
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_background_process_next_batch
function to handle subsequent requests to process additional job batches.
This function is created in the module file called modules/images/regenerate-existing-images/background-process.php
Acceptance Criteria
- Function accepts the following parameters
$job_id
- A integer that is the ID for a job to run the next batch for.
- The function will create a new requests key to pass in the request.
- Generate a random key with the
wp_generate_password
function - Save that key to the options table with the key
background_process_key_{$job_id}
- Generate a random key with the
- The function will make a HTTP request to the
admin-ajax.php
endpoint with thewp_remote_post
along with the following parameters- action:
wp_ajax_background_process_next_batch
- timeout:
0.1
- data:
array( 'job_id' => $job_id, 'key' => $key )
- 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_Error
fromwp_remote_post
- On success, the function returns
true
- On failure the function returns the
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