mirror of
https://github.com/apache/arrow.git
synced 2026-10-28 16:47:19 +08:00
Pass Flight context to ListActions in Python
This commit is contained in:
1 parent
b0f71d9675
commit
0484c333cf
2 files changed
+2
-2
No files matched your search
@@ -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."),
|
||||
|
||||
@@ -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])
|
||||
|
||||
Reference in new issue
Block a user