Skip to content

Commit

Permalink
OSM
Browse files Browse the repository at this point in the history
  • Loading branch information
docuracy committed Jan 25, 2025
1 parent 5002986 commit 28d231a
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 15 deletions.
6 changes: 6 additions & 0 deletions deploy.sh
Original file line number Diff line number Diff line change
Expand Up @@ -356,6 +356,12 @@ if ! kubectl apply -f "$SCRIPT_DIR/system/metallb-config.yaml"; then
fi
echo "MetalLB installation and configuration complete."

# Install Longhorn
echo "Installing Longhorn..."
helm install longhorn longhorn/longhorn --namespace longhorn-system --create-namespace --set persistence.defaultClass=true
echo "Waiting for Longhorn pods to be ready..."
kubectl rollout status deployment/longhorn-manager -n longhorn-system

# Install Contour Ingress controller (used for routing external traffic to services)
if [ "$K8S_CONTROLLER" == 1 ]; then
echo "Installing Contour Ingress controller..."
Expand Down
2 changes: 1 addition & 1 deletion docs-source/content/500-System.md
Original file line number Diff line number Diff line change
Expand Up @@ -164,7 +164,7 @@ source ~/.bashrc
```bash
cd ~ # Change to the home directory
sudo apt update && sudo apt upgrade -y
sudo apt install -y curl git unzip htop ufw aria2
sudo apt install -y curl git unzip htop ufw aria2 open-iscsi
git clone https://github.com/WorldHistoricalGazetteer/place.git
```

Expand Down
20 changes: 8 additions & 12 deletions vespa/repository/api/ingestion/streamer.py
Original file line number Diff line number Diff line change
Expand Up @@ -190,22 +190,18 @@ async def _parse_xml_stream(self, stream):
Asynchronous parser for XML streams.
"""
def parse():
for line in stream:
try:
# Parse XML into a dictionary
doc = xmltodict.parse(line)
# Use xmltodict's streaming mode to process XML elements one by one
try:
for doc in xmltodict.parse(stream, items=("item", self.item_path), stream=True):
yield doc
except Exception as e:
self.logger.error(f"Failed to parse XML line: {line}. Error: {e}")
continue
except Exception as e:
self.logger.error(f"Failed to parse XML stream. Error: {e}")
raise

for item in await asyncio.to_thread(parse):
# Run parsing in a separate thread to avoid blocking the event loop
async for item in asyncio.to_thread(parse):
yield item

# Run synchronous parsing in a thread and asynchronously yield results
for elem_data in await asyncio.to_thread(parse):
yield elem_data

def _split_triple(self, line):
parts = line.rstrip(' .').split(' ', 2)

Expand Down
4 changes: 2 additions & 2 deletions vespa/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -105,9 +105,9 @@ resources:
memory: "4G"
api:
requests:
memory: "4G"
memory: "1G"
limits:
memory: "8G"
memory: "4G"

common:
initContainer: |
Expand Down

0 comments on commit 28d231a

Please sign in to comment.