Open jjgrainger opened 2 years ago
@jjgrainger The ACs here LGTM, however this may also be slightly affected by https://github.com/WordPress/performance/issues/482#issuecomment-1224996357.
@felixarntz this has been updated based on your comments on #482
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
time_exceeded
method in thePerflab_Background_Process
classini_get( 'max_execution_time' )
or a fallback value of 30 seconds, minus 10 seconds. This becomes the$limit
value.time() >= ( $start_time + $limit )
perflab_background_process_time_exceeded
, $return );`