Skip to content

Commit 5572087

Browse files
committed
Update plugin constant as well in cache host update
1 parent db6a2dc commit 5572087

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

migrations/container/20181225063950_service-command_change_global_service_container_names.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -209,6 +209,7 @@ public static function start_global_service_containers( $containers ) {
209209
*/
210210
public static function update_cache_host( $site_info ) {
211211
$update_hostname_constant = "docker-compose exec --user='www-data' php wp config set RT_WP_NGINX_HELPER_REDIS_HOSTNAME global-redis --add=true --type=constant";
212+
$redis_plugin_constant = 'docker-compose exec --user=\'www-data\' php wp config set --type=variable redis_server "array(\'host\'=> global-redis,\'port\'=> 6379,)" --raw';
212213

213214
if( ! chdir( $site_info->site_fs_path ) ) {
214215
throw new \Exception( sprintf( '%s path not exists', $site_info->site_fs_path ) );
@@ -218,6 +219,9 @@ public static function update_cache_host( $site_info ) {
218219
throw new \Exception( sprintf( 'Unable to update cache host of %s', $site_info->site_url ) );
219220
}
220221

222+
if ( ! EE::exec( $redis_plugin_constant ) ) {
223+
throw new \Exception( sprintf( 'Unable to update plugin constant %s', $site_info->site_url ) );
224+
}
221225
EE::log( sprintf( '%s Updated cache-host successfully', $site_info->site_url ) );
222226
}
223227

0 commit comments

Comments
 (0)