Skip to content

Commit 83197a2

Browse files
committed
Remove docker-based run_sql
1 parent 181bdb9 commit 83197a2

File tree

1 file changed

+0
-20
lines changed

1 file changed

+0
-20
lines changed

apps/faf-legacy-deployment/scripts/deploy-coop-maps.py

Lines changed: 0 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -290,26 +290,6 @@ def run_checked_shell(cmd: List[str]) -> subprocess.CompletedProcess:
290290
return subprocess.run(cmd, check=True, stdout=subprocess.PIPE)
291291

292292

293-
def run_sql(sql: str, container: str = "faf-db", database: str = "faf_lobby") -> str:
294-
295-
"""
296-
Run a sql-query against the faf-db in the docker container
297-
:param database: name of the database where to run the query
298-
:param container: name of the docker container where to run the query
299-
:param sql: the sql-query to run
300-
:return: the query output as string
301-
"""
302-
try:
303-
sql_text_result = run_checked_shell(
304-
["docker", "exec", "-u", "root", container, "mysql", database, "-e", sql]
305-
).stdout.decode() # type: str
306-
logger.debug(f"SQL output >>> \n{sql_text_result}<<<")
307-
return sql_text_result
308-
except subprocess.CalledProcessError as e:
309-
logger.error(f"""Executing sql query failed: {sql}\n\t\tError message: {str(e)}""")
310-
exit(1)
311-
312-
313293
def git_checkout(path: str, tag: str) -> None:
314294
"""
315295
Checkout a git tag of the git repository. This requires the repo to be checked out in the path folder!

0 commit comments

Comments
 (0)