code: def ReadMessageHandlerRequests(self):
      
      res = []
      leases = self.message_handler_leases
      for requests in itervalues(self.message_handler_requests):
        for r in itervalues(requests):
          res.append(r.Copy())
          existing_lease = leases.get(r.handler_name, {}).get(r.request_id, None)
          res[-1].leased_until = existing_lease
  
      return sorted(res, key=lambda r: -1 * r.timestamp)
docs: Reads all message handler requests from the database.