Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
gsanchietti committed Feb 26, 2025
1 parent c34755e commit cb8d96c
Showing 1 changed file with 4 additions and 11 deletions.
15 changes: 4 additions & 11 deletions core/imageroot/usr/local/sbin/switch-leader
Original file line number Diff line number Diff line change
Expand Up @@ -198,17 +198,10 @@ if install_metrics and node_id == self_id:
errors += 1
else:
mid = result['output']['module_id'] # New module ID
if settings:
rdb.hset(f'module/{mid}/settings', mapping=settings)
if custom_alerts:
rdb.hset(f'module/{mid}/custom_alerts', mapping=custom_alerts)
if custom_templates:
rdb.hset(f'module/{mid}/custom_templates', mapping=custom_templates)

result_config = agent.tasks.run("cluster", "restart-module", data={
"module_id": mid,
"node": node_id,
"check_idle_time": 0,
result_config = agent.tasks.run(f"module/{mid}", "restore-configuration", data={
"settings": settings,
"custom_alerts": custom_alerts,
"custom_templates": custom_templates,
},
extra={
"isNotificationHidden": True,
Expand Down

0 comments on commit cb8d96c

Please sign in to comment.