fix: stress-test on virgin servers
This commit is contained in:
parent
2894ed5efd
commit
8b53644f14
3 changed files with 9 additions and 1 deletions
|
|
@ -46,12 +46,18 @@ EOL
|
|||
|
||||
# Update db config
|
||||
sudo -u postgres psql -t -d lamassu_stress -c "select data from user_config where type='config' order by id desc limit 1" > config.json
|
||||
if [[ -s config.json ]]
|
||||
then
|
||||
NEW_CONFIG=$(node ./utils/save-config.js $NUMBER $DEVICE_ID)
|
||||
sudo -u postgres psql "lamassu_stress" << EOF
|
||||
insert into user_config(type, data, created, valid)
|
||||
values('config', '$NEW_CONFIG', now(), 't')
|
||||
EOF
|
||||
|
||||
else
|
||||
echo "file is empty"
|
||||
fi
|
||||
|
||||
# Add device on db
|
||||
sudo -u postgres psql "lamassu_stress" << EOF
|
||||
insert into devices(device_id, cashbox, cassette1, cassette2, paired, display, created, name, last_online, location)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue