From 31c13917260886bfdf3a45f12f6e31201643cb1c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Krist=C3=B3f=20T=C3=B3th?= Date: Fri, 20 Apr 2018 14:51:08 +0200 Subject: [PATCH] Make seppuku command trigger frontend reload --- solvable/src/event_handler_main.py | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/solvable/src/event_handler_main.py b/solvable/src/event_handler_main.py index fe3fb2d..ae2359d 100644 --- a/solvable/src/event_handler_main.py +++ b/solvable/src/event_handler_main.py @@ -37,11 +37,12 @@ class TestCommands(TerminalCommands): def command_seppuku_tfw(self, *args): seppuku = ('nohup sh -c "supervisorctl restart tfwserver event_handler_main" &> /dev/null & ' 'clear && echo "Committed seppuku! :)" && sleep infinity') - TFWServerConnector().send_to_eventhandler({ - 'key': 'shell', - 'data': {'command': 'write', - 'shellcmd': f'{seppuku}\n'} - }) + uplink = TFWServerConnector() + uplink.send_to_eventhandler({'key': 'shell', + 'data': {'command': 'write', + 'shellcmd': f'{seppuku}\n'}}) + uplink.send({'key': 'dashboard', + 'data' :{'command': 'reload_frontend'}}) def command_changelayout(self, *args): message = {'key': 'dashboard',