@transactional_session
def touch_collection_replicas(collection_replicas, session=None):
    '\n    Update the accessed_at timestamp of the given collection replicas.\n\n    :param collection_replicas: the list of collection replicas.\n    :param session: The database session in use.\n\n    :returns: True, if successful, False otherwise.\n    '
    now = datetime.utcnow()
    for collection_replica in collection_replicas:
        try:
            session.query(models.CollectionReplica).filter_by(scope=collection_replica['scope'], name=collection_replica['name'], rse_id=collection_replica['rse_id']).update({'accessed_at': (collection_replica.get('accessed_at') or now)}, synchronize_session=False)
        except DatabaseError:
            return False
    return True
Update the accessed_at timestamp of the given collection replicas.

:param collection_replicas: the list of collection replicas.
:param session: The database session in use.

:returns: True, if successful, False otherwise.
@transactional_session
def touch_collection_replicas(collection_replicas, session=None):
    '\n    Update the accessed_at timestamp of the given collection replicas.\n\n    :param collection_replicas: the list of collection replicas.\n    :param session: The database session in use.\n\n    :returns: True, if successful, False otherwise.\n    '
    now = datetime.utcnow()
    for collection_replica in collection_replicas:
        try:
            session.query(models.CollectionReplica).filter_by(scope=collection_replica['scope'], name=collection_replica['name'], rse_id=collection_replica['rse_id']).update({'accessed_at': (collection_replica.get('accessed_at') or now)}, synchronize_session=False)
        except DatabaseError:
            return False
    return True