Ramesh-vani commited on
Commit
0ae2826
·
verified ·
1 Parent(s): c1232eb

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +11 -4
app.py CHANGED
@@ -696,11 +696,18 @@ async def exe(websocket,connected,key):
696
 
697
  return_code = await process.wait()
698
  if return_code == 0:
699
- await send_message('Code executed successfully')
700
- pass
 
 
 
 
701
  else:
702
- await send_message(f'error:Execution failed with return code {return_code}')
703
- pass
 
 
 
704
 
705
  except Exception as e:
706
  await error(websocket, str(e))
 
696
 
697
  return_code = await process.wait()
698
  if return_code == 0:
699
+ event = {
700
+ "type": "terminal-data-end",
701
+
702
+ }
703
+ await websocket.send(json.dumps(event))
704
+
705
  else:
706
+ event = {
707
+ "type": "terminal-data-end",
708
+
709
+ }
710
+ await websocket.send(json.dumps(event))
711
 
712
  except Exception as e:
713
  await error(websocket, str(e))