

def _sendReservationUpdateQueue(self, data=None):
    if ((len(data.reservation_update_queue) < 25) and ((len(self.active_jobs) > 0) or (len(self.job_queue) > 0))):
        return
    if (len(self.reservation_update_queue) == 0):
        return
    LOGGER.debug(('Sending reservation queue. Current length is %s' % len(self.reservation_update_queue)))
    reservation_updates = self.reservation_update_queue[0:25]
    replace = ['reservation_next_request', 'reservation_cache']
    reservation_replaces = [(x[0], replace) for x in reservation_updates]
    reservation_updates = dict(reservation_updates)
    reservation_replaces = dict(reservation_replaces)
    self.reservation_update_queue = self.reservation_update_queue[25:]
    d = self.sdb.batchPutAttributes(self.aws_sdb_reservation_domain, reservation_updates, replace_by_item_name=reservation_replaces)
    d.addCallback(self._sendReservationUpdateQueueCallback, reservation_updates.keys())
    d.addErrback(self._sendReservationUpdateQueueErrback, reservation_updates.keys(), reservation_updates)
    if (len(self.reservation_update_queue) > 0):
        reactor.callLater(0, self._sendReservationUpdateQueue)

dataset/ETHPy150Open wehriam/awspider/awspider/servers/execution.py ExecutionServer._sendReservationUpdateQueue/VarMisuse@19/25 `self`->`data`