Untitled

Anonymous
plain_text
01/23/2024 9:13 PM
844 B
16
Indexable
Current code
dbname1 = perf_workflow_config.rdsbms_params_dict["db_name"]
dbpassword1 = perf_workflow_config.rdsbms_params_dict["db_password"]
dbuser1 = perf_workflow_config.rdsbms_params_dict["db_user"]

cmds.append(
            f"engine_public_version=$(/rdsdbbin/oscar/bin/mysql -u {dbuser1} -e \"SELECT aurora_version();\" -p{dbpassword1} | grep -P '[\\d.]+' | tr -d '\\n');"
        )

Can you revise this cmds.append that it is more readable by not using -u and -p and using full flags for username and password and how to avoid creating variables and just feed this directly perf_workflow_config.rdsbms_params_dict["db_name"]
Editor is loading...
Leave a Comment