Skip to content

Commit

Permalink
fix print error
Browse files Browse the repository at this point in the history
  • Loading branch information
aiceflower authored Jul 22, 2023
1 parent 5278d00 commit 1630a20
Showing 1 changed file with 16 additions and 14 deletions.
30 changes: 16 additions & 14 deletions linkis-dist/package/sbin/clear-server.sh
Original file line number Diff line number Diff line change
Expand Up @@ -15,18 +15,20 @@
#

source ${LINKIS_HOME}/conf/db.sh
echo 'DELETE FROM `linkis_cg_manager_label_value_relation` where label_value_key="alias";
DELETE FROM `linkis_cg_manager_label_value_relation` where label_value_key="serviceName";
DELETE FROM `linkis_cg_manager_label_value_relation` where label_value_key="instance";
DELETE FROM `linkis_cg_manager_label` where label_key="engineInstance" or label_key="emInstance";
if [ "$dbType" == "mysql" ]; then
echo 'DELETE FROM `linkis_cg_manager_label_value_relation` where label_value_key="alias";
DELETE FROM `linkis_cg_manager_label_value_relation` where label_value_key="serviceName";
DELETE FROM `linkis_cg_manager_label_value_relation` where label_value_key="instance";
DELETE FROM `linkis_cg_manager_label` where label_key="engineInstance" or label_key="emInstance";
DELETE FROM `linkis_cg_manager_label_service_instance`;
DELETE FROM `linkis_cg_manager_linkis_resources`;
DELETE FROM `linkis_cg_manager_service_instance_metrics`;
DELETE FROM `linkis_cg_manager_lock` ;
DELETE FROM `linkis_cg_manager_label_resource`;
DELETE FROM `linkis_cg_manager_service_instance`;
DELETE FROM `linkis_cg_manager_engine_em`;
' > /tmp/clearserver.command
mysql -h ${MYSQL_HOST} -P${MYSQL_PORT} -u${MYSQL_USER} -p${MYSQL_PASSWORD} ${MYSQL_DB} < /tmp/clearserver.command
rm -f /tmp/clearserver.command
DELETE FROM `linkis_cg_manager_label_service_instance`;
DELETE FROM `linkis_cg_manager_linkis_resources`;
DELETE FROM `linkis_cg_manager_service_instance_metrics`;
DELETE FROM `linkis_cg_manager_lock` ;
DELETE FROM `linkis_cg_manager_label_resource`;
DELETE FROM `linkis_cg_manager_service_instance`;
DELETE FROM `linkis_cg_manager_engine_em`;
' > /tmp/clearserver.command
mysql -h ${MYSQL_HOST} -P${MYSQL_PORT} -u${MYSQL_USER} -p${MYSQL_PASSWORD} ${MYSQL_DB} < /tmp/clearserver.command
rm -f /tmp/clearserver.command
fi

0 comments on commit 1630a20

Please sign in to comment.