Skip to content

Commit

Permalink
wip
Browse files Browse the repository at this point in the history
  • Loading branch information
zhoucheng361 committed Jan 5, 2025
1 parent fdb4c8e commit d3abc34
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion .github/scripts/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,13 @@ def flush_meta(meta_url):
else:
host = host_port
port = 6379
db = meta_url[8:].split('/')[1]
if not db:
db = 0
else:
db = int(db)
print(f'flush redis: {host}:{port}')
run_cmd(f'redis-cli -h {host} -p {port} flushall')
run_cmd(f'redis-cli -h {host} -p {port} -n {db} flushdb')
print(f'flush redis succeed')
elif meta_url.startswith('mysql://'):
create_mysql_db(meta_url)
Expand Down

0 comments on commit d3abc34

Please sign in to comment.