Пример #1
0
def _refresh_ride_requests_all(transaction: Transaction, in_orbit: dict,
                               not_in_orbit: dict, orbit: Orbit, event,
                               location):
    """ Refreshes each rideRequest.

    :param transaction: firestore transaction
    :param in_orbit: all ride requests that are currently in the orbit
    :param not_in_orbit: all ride requests that are no longer in the orbit
    :param orbit: orbit object
    :param event: event object
    :param location: location object representing event location
    :return: None
    """
    for rid, ride_request in in_orbit.items():
        RideRequestGenericDao.set_with_transaction(
            transaction, ride_request, ride_request.get_firestore_ref())

    for rid, ride_request in not_in_orbit.items():
        RideRequestGenericDao.set_with_transaction(
            transaction, ride_request, ride_request.get_firestore_ref())
Пример #2
0
def _refresh_ride_requests_all(transaction: Transaction, in_orbit: dict,
                               not_in_orbit: dict, orbit: Orbit, event,
                               location):
    """ This function refreshes each rideRequests

    :param transaction:
    :param in_orbit:
    :param not_in_orbit:
    :param orbit:
    :param event:
    :param location:
    :return:
    """
    for rid, ride_request in in_orbit.items():
        RideRequestGenericDao.set_with_transaction(
            transaction, ride_request, ride_request.get_firestore_ref())

    for rid, ride_request in not_in_orbit.items():
        RideRequestGenericDao.set_with_transaction(
            transaction, ride_request, ride_request.get_firestore_ref())