Skip to content

Commit cd3b6a8

Browse files
committed
Merge branch 'develop' for v1.7.1
2 parents 53e5abf + 456331d commit cd3b6a8

File tree

1 file changed

+13
-3
lines changed

1 file changed

+13
-3
lines changed

src/WordPress.php

+13-3
Original file line numberDiff line numberDiff line change
@@ -497,7 +497,7 @@ private function enable_page_cache() {
497497
\EE_DOCKER::docker_compose_exec( "wp config set WP_CACHE_KEY_SALT $obj_cache_key_prefix --add=true --type=constant", 'php', 'bash', 'www-data' );
498498
\EE_DOCKER::docker_compose_exec( "wp config set WP_REDIS_MAXTTL 14400 --add=true --type=constant", 'php', 'bash', 'www-data' );
499499
\EE_DOCKER::docker_compose_exec( "wp $wp_cli_params rt_wp_nginx_helper_options '$plugin_data' --format=json", 'php', 'bash', 'www-data' );
500-
500+
501501
}
502502

503503
/**
@@ -1109,8 +1109,18 @@ private function wp_download_and_config( $assoc_args ) {
11091109
$wp_download_path = $this->site_data['site_container_fs_path'];
11101110
$core_download_command = "wp core download --path=$wp_download_path --locale='$this->locale' $core_download_arguments";
11111111

1112-
if ( ! \EE_DOCKER::docker_compose_exec( $core_download_command, 'php', 'bash', 'www-data' ) ) {
1113-
\EE::error( 'Unable to download wp core.', false );
1112+
$retry = 0;
1113+
1114+
while ( $retry < 5 ) {
1115+
if ( ! \EE_DOCKER::docker_compose_exec( $core_download_command, 'php', 'bash', 'www-data' ) ) {
1116+
if ( $retry++ < 5 ) {
1117+
\EE::log( 'Unable to download wp core. Retrying...' );
1118+
continue;
1119+
}
1120+
\EE::error( 'Unable to download wp core.', false );
1121+
} else {
1122+
break;
1123+
}
11141124
}
11151125

11161126
if ( 'db' === $this->site_data['db_host'] ) {

0 commit comments

Comments
 (0)