Skip to content

Commit

Permalink
comment out shared-node cp to avoid full disk (#1416)
Browse files Browse the repository at this point in the history
  • Loading branch information
scottleibrand authored Dec 21, 2021
1 parent 912ab07 commit 5d0984e
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
4 changes: 2 additions & 2 deletions bin/oref0-ns-loop.sh
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ function ns_temptargets {
dir_name=~/test_data/oref0-get-profile$(date +"%Y-%m-%d-%H%M")-ns
#echo dir_name = $dir_name
mkdir -p $dir_name
cp settings/settings.json settings/bg_targets.json settings/insulin_sensitivities.json settings/basal_profile.json preferences.json settings/carb_ratios.json settings/temptargets.json settings/model.json settings/autotune.json $dir_name
#cp settings/settings.json settings/bg_targets.json settings/insulin_sensitivities.json settings/basal_profile.json preferences.json settings/carb_ratios.json settings/temptargets.json settings/model.json settings/autotune.json $dir_name

run_remote_command 'oref0-get-profile settings/settings.json settings/bg_targets.json settings/insulin_sensitivities.json settings/basal_profile.json preferences.json settings/carb_ratios.json settings/temptargets.json --model=settings/model.json --autotune settings/autotune.json' | jq . > settings/profile.json.new || die "Couldn't refresh profile"
if cat settings/profile.json.new | jq . | grep -q basal; then
Expand All @@ -139,7 +139,7 @@ function ns_meal_carbs {
dir_name=~/test_data/oref0-meal$(date +"%Y-%m-%d-%H%M")
#echo dir_name = $dir_name
mkdir -p $dir_name
cp monitor/pumphistory-24h-zoned.json settings/profile.json monitor/clock-zoned.json monitor/glucose.json settings/basal_profile.json monitor/carbhistory.json $dir_name
#cp monitor/pumphistory-24h-zoned.json settings/profile.json monitor/clock-zoned.json monitor/glucose.json settings/basal_profile.json monitor/carbhistory.json $dir_name


run_remote_command 'oref0-meal monitor/pumphistory-24h-zoned.json settings/profile.json monitor/clock-zoned.json monitor/glucose.json settings/basal_profile.json monitor/carbhistory.json' > monitor/meal.json.new
Expand Down
10 changes: 5 additions & 5 deletions bin/oref0-pump-loop.sh
Original file line number Diff line number Diff line change
Expand Up @@ -601,7 +601,7 @@ function refresh_pumphistory_and_meal {
dir_name=~/test_data/oref0-meal$(date +"%Y-%m-%d-%H%M")
#echo dir_name = $dir_name
mkdir -p $dir_name
cp monitor/pumphistory-24h-zoned.json settings/profile.json monitor/clock-zoned.json monitor/glucose.json settings/basal_profile.json monitor/carbhistory.json $dir_name
#cp monitor/pumphistory-24h-zoned.json settings/profile.json monitor/clock-zoned.json monitor/glucose.json settings/basal_profile.json monitor/carbhistory.json $dir_name
if ! retry_return run_remote_command 'oref0-meal monitor/pumphistory-24h-zoned.json settings/profile.json monitor/clock-zoned.json monitor/glucose.json settings/basal_profile.json monitor/carbhistory.json' > monitor/meal.json.new ; then
echo; echo "Couldn't calculate COB"
return 1
Expand Down Expand Up @@ -632,7 +632,7 @@ function calculate_iob {
dir_name=~/test_data/oref0-calculate-iob$(date +"%Y-%m-%d-%H%M")
#echo dir_name = $dir_name
mkdir -p $dir_name
cp monitor/pumphistory-24h-zoned.json settings/profile.json monitor/clock-zoned.json settings/autosens.json $dir_name
#cp monitor/pumphistory-24h-zoned.json settings/profile.json monitor/clock-zoned.json settings/autosens.json $dir_name
run_remote_command 'oref0-calculate-iob monitor/pumphistory-24h-zoned.json settings/profile.json monitor/clock-zoned.json settings/autosens.json' > monitor/iob.json.new || { echo; echo "Couldn't calculate IOB"; fail "$@"; }
[ -s monitor/iob.json.new ] && jq -e .[0].iob monitor/iob.json.new >&3 && cp monitor/iob.json.new monitor/iob.json || { echo; echo "Couldn't copy IOB"; fail "$@"; }
Expand Down Expand Up @@ -685,10 +685,10 @@ function get_settings {

# generate settings/pumpprofile.json without autotune

dir_name=~/test_data/oref0-get-profile$(date +"%Y-%m-%d-%H%M")-pump
#dir_name=~/test_data/oref0-get-profile$(date +"%Y-%m-%d-%H%M")-pump
#echo dir_name = $dir_name
mkdir -p $dir_name
cp settings/settings.json settings/bg_targets.json settings/insulin_sensitivities.json settings/basal_profile.json preferences.json settings/carb_ratios.json settings/temptargets.json settings/model.json $dir_name
#cp settings/settings.json settings/bg_targets.json settings/insulin_sensitivities.json settings/basal_profile.json preferences.json settings/carb_ratios.json settings/temptargets.json settings/model.json $dir_name

run_remote_command 'oref0-get-profile settings/settings.json settings/bg_targets.json settings/insulin_sensitivities.json settings/basal_profile.json preferences.json settings/carb_ratios.json settings/temptargets.json --model=settings/model.json' 2>&3 | jq . > settings/pumpprofile.json.new || { echo "Couldn't refresh pumpprofile"; fail "$@"; }
if [ -s settings/pumpprofile.json.new ] && jq -e .current_basal settings/pumpprofile.json.new >&4; then
Expand All @@ -702,7 +702,7 @@ function get_settings {
dir_name=~/test_data/oref0-get-profile$(date +"%Y-%m-%d-%H%M")-pump-auto
#echo dir_name = $dir_name
mkdir -p $dir_name
cp settings/settings.json settings/bg_targets.json settings/insulin_sensitivities.json settings/basal_profile.json preferences.json settings/carb_ratios.json settings/temptargets.json settings/model.json settings/autotune.json $dir_name
#cp settings/settings.json settings/bg_targets.json settings/insulin_sensitivities.json settings/basal_profile.json preferences.json settings/carb_ratios.json settings/temptargets.json settings/model.json settings/autotune.json $dir_name

run_remote_command 'oref0-get-profile settings/settings.json settings/bg_targets.json settings/insulin_sensitivities.json settings/basal_profile.json preferences.json settings/carb_ratios.json settings/temptargets.json --model=settings/model.json --autotune settings/autotune.json' | jq . > settings/profile.json.new || { echo "Couldn't refresh profile"; fail "$@"; }
if [ -s settings/profile.json.new ] && jq -e .current_basal settings/profile.json.new >&4; then
Expand Down

0 comments on commit 5d0984e

Please sign in to comment.