Skip to content

Commit

Permalink
Update block-ingest docker to 0.2
Browse files Browse the repository at this point in the history
  • Loading branch information
pranaydotparity committed Sep 10, 2024
1 parent 5628fa0 commit 4edcd36
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 4 deletions.
4 changes: 3 additions & 1 deletion dotlakeIngest.sh
Original file line number Diff line number Diff line change
Expand Up @@ -44,12 +44,14 @@ fi

# Start Block Ingest Service
echo "Starting Block Ingest Service..."
docker run -d --rm -e CHAIN="$CHAIN" -e RELAY_CHAIN="$RELAY_CHAIN" -e WSS="$WSS" -p 8501:8501 eu.gcr.io/parity-data-infra-evaluation/block-ingest:0.1
docker run -d --rm -e CHAIN="$CHAIN" -e RELAY_CHAIN="$RELAY_CHAIN" -e WSS="$WSS" -p 8501:8501 eu.gcr.io/parity-data-infra-evaluation/block-ingest:0.2
if [ $? -eq 0 ]; then
echo "Block Ingest Service started successfully."
else
echo "Failed to start Block Ingest Service."
exit 1
fi

echo "Starting the services....this will take a minute...."
sleep 60
echo "Both services are now running. You can access Substrate API Sidecar at http://localhost:8080 and Block Ingest Service at http://localhost:8501"
2 changes: 1 addition & 1 deletion ingest/Home.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
from streamlit_autorefresh import st_autorefresh

# Function to connect to DuckDB
def connect_to_db(db_path='/Users/pranaypatil/data_eng_repos/data-applications/blocks.db'):
def connect_to_db(db_path='blocks.db'):
return duckdb.connect(db_path, read_only=True)

def parse_arguments():
Expand Down
5 changes: 3 additions & 2 deletions ingest/pages/Search.py
Original file line number Diff line number Diff line change
Expand Up @@ -66,10 +66,11 @@ def parse_arguments():

# Display events
st.write("Events:")
events = pd.DataFrame([
events = [
event for extrinsic in result['extrinsics'].iloc[0]
for event in extrinsic['events']
])
] + result['onInitialize'].iloc[0]['events'] + result['onFinalize'].iloc[0]['events']
events = pd.DataFrame(events)
st.dataframe(events)

else:
Expand Down

0 comments on commit 4edcd36

Please sign in to comment.