Skip to content

Commit 40a38ef

Browse files
authored
extend the waiting time for port (9944) release when rebooting; wait 5 second before checking worker status. (#1552)
1 parent 946683c commit 40a38ef

File tree

2 files changed

+6
-4
lines changed

2 files changed

+6
-4
lines changed

.github/workflows/dev-sgx-restart.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ jobs:
2727
sudo systemctl stop integritee.service
2828
cd /home/ubuntu/repo/litentry-parachain/tee-worker
2929
./scripts/litentry/stop_parachain.sh
30-
sleep 30 #after stoping the docker, it takes some time to release port 9944 by docker-proxy.
30+
sleep 60 #after stoping the docker, it takes some time to release port 9944 by docker-proxy.
3131
./scripts/litentry/start_parachain.sh
3232
sudo systemctl start integritee.service
3333

tee-worker/local-setup/launch.py

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,8 @@ def main(processes, config_path, parachain_type):
6666
for w_conf in config["workers"]:
6767
processes.append(run_worker(w_conf, worker_i))
6868
print()
69+
# Wait a bit for worker to start up.
70+
sleep(5)
6971

7072
idx = 0
7173
if ( "-h" in w_conf["flags"] ):
@@ -87,14 +89,14 @@ def main(processes, config_path, parachain_type):
8789
c.setopt(c.WRITEDATA, buffer)
8890
try:
8991
c.perform()
90-
except:
91-
print("Connect to worker: error")
92+
except Exception as e:
93+
print("Try to connect to worker error: " + str(e))
9294
return 0
9395

9496
if "I am initialized." == buffer.getvalue().decode('iso-8859-1'):
9597
break
9698
if counter >= 60:
97-
print("Worker initialization error. Exit")
99+
print("Worker initialization timeout (300s). Exit")
98100
return 0
99101
counter = counter + 1
100102

0 commit comments

Comments
 (0)