Changeset 1074:638d4c261307 for src/mlx
- Timestamp:
- 02/14/23 14:27:21 (22 months ago)
- Branch:
- python3
- Phase:
- public
- Location:
- src/mlx
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
src/mlx/rpc.py
r1069 r1074 752 752 for typeCode in reply.value["typeCodes"]] 753 753 754 return (reply.value["name"], reply.value["rank"], types) 754 return (reply.value["name"], reply.value["rank"], types, 755 self._sessionID) 755 756 else: 756 757 return None … … 869 870 tailNumber)) 870 871 return [BookedFlight(value) for value in values] 872 873 def getSimBriefResult(self, timestamp): 874 """Get the SimBrief results for the given timestamp.""" 875 return self._performCall(lambda sessionID: 876 self._server.getSimBriefResult(sessionID, 877 timestamp)) 871 878 872 879 def _performCall(self, callFn, acceptResults = []): -
src/mlx/web.py
r1057 r1074 473 473 result.rank = loginResult[1] 474 474 result.types = loginResult[2] 475 result.sessionID = loginResult[3] 475 476 result.password = password 476 477 result.fleet = client.getFleet() … … 876 877 #------------------------------------------------------------------------------ 877 878 879 class GetSimBriefResult(RPCRequest): 880 """Request the SimBrief result.""" 881 def __init__(self, client, callback, timestamp): 882 """Construct the request with the given client and callback function.""" 883 super(GetSimBriefResult, self).__init__(client, callback) 884 self._timestamp = timestamp 885 886 def run(self): 887 """Perform the request.""" 888 result = Result() 889 890 result.result = self._client.getSimBriefResult(self._timestamp) 891 892 return result 893 894 #------------------------------------------------------------------------------ 895 878 896 class Handler(threading.Thread): 879 897 """The handler for the web services. … … 970 988 self._addRequest(BookFlights(self._rpcClient, callback, 971 989 flightIDs, date, tailNumber)) 990 991 def getSimBriefResult(self, callback, timestamp): 992 """Enqueue a request to get the SimBrief result.""" 993 self._addRequest(GetSimBriefResult(self._rpcClient, callback, 994 timestamp)) 972 995 973 996 def run(self):
Note:
See TracChangeset
for help on using the changeset viewer.