Skip to content

Commit

Permalink
Make mysql command 1 line in the cron job (#117)
Browse files Browse the repository at this point in the history
* Remove comment separation from schema.sql

* Improve project fargate memory

* Make mysql command 1 line
  • Loading branch information
campos20 authored Jul 23, 2024
1 parent 0c935da commit 55cb81b
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 6 deletions.
2 changes: 1 addition & 1 deletion iac/variable.tf
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ variable "statistics_fargate_cpu" {
}

variable "statistics_fargate_memory" {
default = "2048"
default = "4096"
}

variable "dumped_db_name" {
Expand Down
3 changes: 1 addition & 2 deletions scripts/get_db_export.sh
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,6 @@ fi
echo "Executing the .sql"
echo "This can take a few hours"

mysql -h ${DB_HOST:-localhost} -u ${DB_USERNAME:-root} -P ${DB_PORT:-3306} --password=${DB_PASSWORD:-} \
-e "start transaction; drop database if exists $database_name; create database $database_name; use $database_name; source $export_file_sql; commit;"
mysql -h ${DB_HOST:-localhost} -u ${DB_USERNAME:-root} -P ${DB_PORT:-3306} --password=${DB_PASSWORD:-} -e "start transaction; drop database if exists $database_name; create database $database_name; use $database_name; source $export_file_sql; commit;"

echo "Complete"
3 changes: 0 additions & 3 deletions server/src/main/resources/schema.sql
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,6 @@ create table if not exists sum_of_ranks_meta (
primary key (result_type, region, region_type)
);

----------------------------------------------------------------------------------------------------
-- Person link
drop function if exists wca_statistics_person_link_format;

Expand All @@ -61,7 +60,6 @@ create function wca_statistics_person_link_format(
'</a>'
);

----------------------------------------------------------------------------------------------------
-- Competition link
drop function if exists wca_statistics_competition_link_format;

Expand All @@ -76,7 +74,6 @@ create function wca_statistics_competition_link_format(
'</a>'
);

----------------------------------------------------------------------------------------------------
-- Time format
drop function if exists wca_statistics_time_format;

Expand Down

0 comments on commit 55cb81b

Please sign in to comment.