Skip to content

Commit

Permalink
Add Config for How Many Days to Schedule
Browse files Browse the repository at this point in the history
Add a configuration property that allows for scheduling X days out.
  • Loading branch information
jekhokie committed Mar 31, 2021
1 parent 504b77b commit da15c63
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 2 deletions.
1 change: 1 addition & 0 deletions ansible/roles/common/templates/noaa-v2.conf.j2
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ METEOR_AUDIO_OUTPUT={{ audio_output }}/meteor
NOAA_ANIMATION_OUTPUT={{ noaa_animation_output }}
RAMFS_AUDIO={{ ramfs_path }}
NOAA_LOG={{ log_file }}
DAYS_TO_SCHEDULE_PASSES={{ days_to_schedule_passes }}
LAT={{ latitude }}
LON={{ longitude }}
TEST_GAIN={{ test_gain }}
Expand Down
10 changes: 10 additions & 0 deletions config/settings.yml.sample
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,16 @@ meteor_m2_gain: 7.7
meteor_m2_sun_min_elevation: 6
meteor_m2_sat_min_elevation: 30

# how many days to schedule passes - note this MUST be an even integer,
# and the current day counts as "1" - passes will be scheduled until midnight
# of the `days_to_schedule_passes` final day
#
# NOTE: If you want to set this value LOWER than a previously configured
# value, you must run the schedule script manually and pass the '-x' switch
# after re-running the ./install_and_upgrade.sh script to align the variables:
# ./scripts/schedule.sh -x
days_to_schedule_passes: 1

# whether audio files should be deleted after images are created
delete_audio: false

Expand Down
2 changes: 2 additions & 0 deletions config/settings_schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,7 @@
"minimum": 0,
"maximum": 90
},
"days_to_schedule_passes": { "type": "number" },
"delete_audio": { "type": "boolean" },
"flip_meteor_image": { "type": "boolean" },
"produce_spectrogram": { "type": "boolean" },
Expand Down Expand Up @@ -183,6 +184,7 @@
"meteor_m2_gain",
"meteor_m2_sun_min_elevation",
"meteor_m2_sat_min_elevation",
"days_to_schedule_passes",
"delete_audio",
"flip_meteor_image",
"produce_spectrogram",
Expand Down
4 changes: 2 additions & 2 deletions install_and_upgrade.sh
Original file line number Diff line number Diff line change
Expand Up @@ -128,15 +128,15 @@ log_running "Updating web content..."
) || die " Something went wrong updating web content - please inspect the logs above"

# run a schedule of passes (as opposed to waiting until cron kicks in the evening)
log_running "Scheduling first passes for imagery..."
log_running "Scheduling passes for imagery..."
if [ ! -f $WEATHER_TXT ] || [ ! -f $AMATEUR_TXT ] || [ ! -f $TLE_OUTPUT ]; then
log_running "Scheduling with new TLE downloaded data..."
./scripts/schedule.sh -t
else
log_running "Scheduling with existing TLE data (not downloading new)..."
./scripts/schedule.sh
fi
log_running "First passes scheduled!"
log_running "Passes scheduled!"

echo ""
echo "-------------------------------------------------------------------------------"
Expand Down

0 comments on commit da15c63

Please sign in to comment.