Pass Flight context to ListActions in Python

This commit is contained in:
David Li committed 2019-06-26 09:25:13 -04:00
1 parent b0f71d9675
commit 0484c333cf
2 files changed
+2 -2

No files matched your search

+1 -1
View File
@@ -77,7 +77,7 @@ class FlightServer(pyarrow.flight.FlightServerBase):
return None
return pyarrow.flight.RecordBatchStream(self.flights[key])
def list_actions(self):
def list_actions(self, context):
return [
("clear", "Clear the stored flights."),
("shutdown", "Shut down this server."),
+1 -1
View File
@@ -1145,7 +1145,7 @@ cdef void _list_actions(void* self, const CServerCallContext& context,
cdef:
CActionType action_type
# Method should return a list of ActionTypes or similar tuple
result = (<object> self).list_actions()
result = (<object> self).list_actions(ServerCallContext.wrap(context))
for action in result:
action_type.type = tobytes(action[0])
action_type.description = tobytes(action[1])