Skip to content

Commit a0018fe

Browse files
committed
Ignore time limit when run from CLI.
1 parent 35c8c29 commit a0018fe

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

classes/wp-background-process.php

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -606,7 +606,10 @@ protected function time_exceeded() {
606606
$finish = $this->start_time + apply_filters( $this->identifier . '_default_time_limit', 20 ); // 20 seconds
607607
$return = false;
608608

609-
if ( time() >= $finish ) {
609+
if (
610+
! ( defined( 'WP_CLI' ) && WP_CLI ) &&
611+
time() >= $finish
612+
) {
610613
$return = true;
611614
}
612615

0 commit comments

Comments
 (0)