Skip to content

Commit

Permalink
Add create-blex-dbs, stat-blex-dbs, unlock-blex-dbs commands
Browse files Browse the repository at this point in the history
  • Loading branch information
blitzstern5 committed Apr 3, 2019
1 parent ed374b7 commit e9ec2bc
Show file tree
Hide file tree
Showing 5 changed files with 49 additions and 13 deletions.
2 changes: 1 addition & 1 deletion .gitmodules
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
branch = master
[submodule "genesis-bf/genesis-scripts"]
path = genesis-bf/genesis-scripts
url = [email protected]:blitzstern5/genesis-scripts
url = git@blitzstern5.github.com:blitzstern5/genesis-scripts
branch = master
[submodule "genesis-blex/genesis-scripts"]
path = genesis-blex/genesis-scripts
Expand Down
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
## Version 0.9.4 / 2019-Apr-03 04:16
* Update scripts to v0.2.5
* Add clear-blex-dbs, stat-blex-dbs, unlock-blex-dbs commands

## Version 0.9.3 / 2019-Mar-29 11:39
* Update license
* Add tries to import and system params update transactions
Expand Down
8 changes: 8 additions & 0 deletions CONTENT.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,11 @@
# Version 0.9.4

* [Backend v1.2.7](https://github.com/AplaProject/go-apla/releases/tag/1.2.7)
* [Frontend v0.11.1](https://github.com/GenesisKernel/genesis-front/releases/tag/v0.11.1)
* [Applications v1.4.0](https://github.com/AplaProject/apps/releases/tag/v1.4.0)
* [Block Explorer v0.3.2](https://github.com/GenesisKernel/blockexplorer/releases/tag/v0.3.2)
* [Scripts v0.2.5](https://github.com/blitzstern5/genesis-scripts/releases/tag/v0.2.5)

# Version 0.9.3

* [Backend v1.2.7](https://github.com/AplaProject/go-apla/releases/tag/1.2.7)
Expand Down
2 changes: 1 addition & 1 deletion genesis-bf/genesis-scripts
Submodule genesis-scripts updated from 51b9e6 to 0246d0
46 changes: 35 additions & 11 deletions manage.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2508,17 +2508,29 @@ stop_blex() {
&& docker exec -t $BLEX_CONT_NAME bash -c "supervisorctl stop blockexplorer-worker"
}

#create_blex_dbs() {
# local i num wps cps dbp cfp blexp db_name
# read_install_params_to_vars || return $?
# check_cont $DB_CONT_NAME > /dev/null \
# run_mblex_cmd create-dbs $num
# for i in $(seq 1 $num); do
# db_name="$BLEX_DB_NAME_PREFIX$i"
# echo "Creating '$db_name' database @ '$DB_CONT_NAME' ..."
# docker exec -ti $DB_CONT_NAME bash /db.sh create postgres "$db_name"
# done
#}
create_blex_dbs() {
local i num wps cps dbp cfp blexp db_name
read_install_params_to_vars || return $?
check_cont $BLEX_CONT_NAME > /dev/null \
&& check_cont $DB_CONT_NAME > /dev/null \
&& run_mblex_cmd create-dbs $num
}

stat_blex_dbs() {
local i num wps cps dbp cfp blexp db_name
read_install_params_to_vars || return $?
check_cont $BLEX_CONT_NAME > /dev/null \
&& check_cont $DB_CONT_NAME > /dev/null \
&& run_mblex_cmd stat-dbs $num
}

unlock_blex_dbs() {
local i num wps cps dbp cfp blexp db_name
read_install_params_to_vars || return $?
check_cont $BLEX_CONT_NAME > /dev/null \
&& check_cont $DB_CONT_NAME > /dev/null \
&& run_mblex_cmd unlock-dbs $num
}

setup_blex() {
local num blexp
Expand Down Expand Up @@ -6457,6 +6469,18 @@ pre_command() {
create_blex_dbs $num
;;

stat-blex-dbs)
num=""; wps=""; cps=""; dbp=""; blexp=""
read_install_params_to_vars || exit 19
stat_blex_dbs $num
;;

unlock-blex-dbs)
num=""; wps=""; cps=""; dbp=""; blexp=""
read_install_params_to_vars || exit 19
unlock_blex_dbs $num
;;

setup-blex)
num=""; wps=""; cps=""; dbp=""; blexp=""
read_install_params_to_vars || exit 19
Expand Down

0 comments on commit e9ec2bc

Please sign in to comment.