MCPcopy Create free account
hub / github.com/apache/arrow / do_action

Method do_action

r/inst/demo_flight_server.py:101–113  ·  view source on GitHub ↗
(self, context, action)

Source from the content-addressed store, hash-verified

99 ]
100
101 def do_action(self, context, action):
102 print("do_action")
103 if action.type == "clear":
104 raise NotImplementedError(f"{action.type} is not implemented.")
105 elif action.type == "healthcheck":
106 pass
107 elif action.type == "shutdown":
108 yield pyarrow.flight.Result(pyarrow.py_buffer(b'Shutdown!'))
109 # Shut down on background thread to avoid blocking current
110 # request
111 threading.Thread(target=self._shutdown).start()
112 else:
113 raise KeyError(f"Unknown action {action.type!r}")
114
115 def _shutdown(self):
116 """Shut down after a delay."""

Callers

nothing calls this directly

Calls 3

KeyErrorFunction · 0.85
ResultMethod · 0.80
startMethod · 0.45

Tested by

no test coverage detected