-
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::time_exceeded
to calculate the total time used within the background process. This function checks the total time taken within the background process so that it can break the while loop 10 seconds before the server timeout limit is reached. The boolean value returned by the function will be filterable to allow other developers to modify the timeout limit.
Acceptance Criteria
- Create a new
time_exceeded
method in thePerflab_Background_Process
class - The method accepts no parameters
- The method returns a boolean
- The total timeout limit is calculated by taking the value of
ini_get( 'max_execution_time' )
or a fallback value of 30 seconds, minus 10 seconds. This becomes the$limit
value. - The timeout limit is tested by checking the
time() >= ( $start_time + $limit )
- The boolean value returned is filtered using apply_filters(
perflab_background_process_time_exceeded
, $return );`
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