fix(cluster-link): avoid starting ps syncer if persistence disabled

This commit is contained in:
Andrew Mayorov 2024-05-28 20:25:22 +02:00 committed by Serge Tupchii
parent 036c7e8492
commit e9c24090d4
1 changed files with 4 additions and 4 deletions

View File

@ -241,10 +241,10 @@ init({sup, TargetCluster}) ->
intensity => 10,
period => 60
},
Children = [
child_spec(actor, TargetCluster),
child_spec(ps_actor, TargetCluster)
],
Children = lists:append([
[child_spec(actor, TargetCluster)],
[child_spec(ps_actor, TargetCluster) || emqx_persistent_message:is_persistence_enabled()]
]),
{ok, {SupFlags, Children}};
init({actor, State}) ->
init_actor(State).