Ignore:
Timestamp:
09/25/16 06:42:50 (8 years ago)
Author:
István Váradi <ivaradi@…>
Branch:
default
hg-Phase:
(<MercurialRepository 1 'hg:/home/ivaradi/mlx/hg' '/'>, 'public')
Message:

A flight can be marked for reflying (re #307).

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/mlx/web.py

    r809 r821  
    12421242#------------------------------------------------------------------------------
    12431243
     1244class ReflyFlights(RPCRequest):
     1245    """A request to mark certain flights for reflying."""
     1246    def __init__(self, client, callback, flightIDs):
     1247        """Construct the request."""
     1248        super(ReflyFlights, self).__init__(client, callback)
     1249        self._flightIDs = flightIDs
     1250
     1251    def run(self):
     1252        """Perform the update."""
     1253        self._client.reflyFlights(self._flightIDs)
     1254        return Result()
     1255
     1256#------------------------------------------------------------------------------
     1257
    12441258class Handler(threading.Thread):
    12451259    """The handler for the web services.
     
    13231337                                              callback, aircraftType))
    13241338
     1339    def reflyFlights(self, callback, flightIDs):
     1340        """Mark the flights with the given IDs for reflying."""
     1341        self._addRequest(ReflyFlights(self._rpcClient, callback, flightIDs))
     1342
    13251343    def run(self):
    13261344        """Process the requests."""
Note: See TracChangeset for help on using the changeset viewer.