Skip to content

Commit

Permalink
fix: check container name contain text, not stricly equal text
Browse files Browse the repository at this point in the history
  • Loading branch information
rcstanciu committed Jun 10, 2021
1 parent 70da202 commit 67e3354
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions monitor.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ def check_mina_node_status():
global MAX_RETRY_COUNT
global GRAPHQL_URI
global STATUS_COUNT

retry_count = 0

while retry_count < MAX_RETRY_COUNT:
Expand Down Expand Up @@ -152,7 +152,7 @@ def restart_node():
global client

for item in client.containers.list():
if item.name == "node" or item.name == "sidecar":
if "node" in item.name or "sidecar" in item.name:
item.stop()
break

Expand Down

0 comments on commit 67e3354

Please sign in to comment.