Skip to content

Commit 362dbbc

Browse files
committed
fix: wait for Graph node before subgraph deployment
Add a retry loop to wait for the Graph node to be ready on port 8020 before attempting to create and deploy the subgraph.
1 parent 7f5ac2f commit 362dbbc

1 file changed

Lines changed: 9 additions & 0 deletions

File tree

.circleci/config.yml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,15 @@ references:
4343
name: 'Subgraph deployment and configuration'
4444
working_directory: ~/
4545
command: |
46+
# Wait for Graph node to be ready
47+
for i in $(seq 1 30); do
48+
if curl -s http://localhost:8020 > /dev/null 2>&1; then
49+
echo "Graph node is ready"
50+
break
51+
fi
52+
echo "Waiting for Graph node... ($i/30)"
53+
sleep 2
54+
done
4655
git clone https://github.com/RequestNetwork/storage-subgraph
4756
cd storage-subgraph
4857
yarn

0 commit comments

Comments
 (0)