Skip to content

Commit

Permalink
Update utils.py
Browse files Browse the repository at this point in the history
  • Loading branch information
RhinosF1 authored May 18, 2024
1 parent f98d71b commit 5f3f30f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions miraheze/salt/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,9 +39,9 @@ def execute_salt_command(salt_command: str, shell: bool = True, stdout: Optional


def get_db_cluster(wiki: str) -> str:
db_query = f'SELECT wiki_dbcluster FROM mhglobal.cw_wikis WHERE wiki_dbname = \\"{wiki}\\"'
db_query = f"SELECT wiki_dbcluster FROM mhglobal.cw_wikis WHERE wiki_dbname = '{wiki}'"
command = generate_salt_command('db171', f"sudo -i mysql --skip-column-names -e '{db_query}'")
result = execute_salt_command(salt_command=command, stdout=subprocess.PIPE, text=True)
result = execute_salt_command(salt_command=commandd, stdout=subprocess.PIPE, text=True)
if result:
cluster_name = result.stdout.strip()
cluster_data = cluster_name.split('\n')
Expand Down

0 comments on commit 5f3f30f

Please sign in to comment.