From cafbca970e35aa2332d7c965a9278d0f8fcd9aae Mon Sep 17 00:00:00 2001 From: John Wiseman Date: Thu, 28 May 2020 12:35:11 -0700 Subject: [PATCH] Reduce ADSBX API usage. By default, run the bot script every 15 seconds instead of every 10. And if there's an error, wait 30 seconds to restart instead of 10. --- advisorycircular.sh | 2 +- advisorycircular@.service | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/advisorycircular.sh b/advisorycircular.sh index d00a0c2..e4d1c61 100644 --- a/advisorycircular.sh +++ b/advisorycircular.sh @@ -10,4 +10,4 @@ sqb_path=/usr/local/share/advisorycircular/clean-basestation.sqb config_path="$config_dir"/"$instance"-config.yaml secrets_path="$config_dir"/"$instance"-secrets.yaml history_path="$run_dir"/"$instance"-history.json -(cd "$run_dir" && "$dir"/intervalexec 10 node $dir/out/advisorycircular.js --config "$config_path" --secrets "$secrets_path" --basestation-sqb "$sqb_path" --history "$history_path" --log-prefix "$instance") +(cd "$run_dir" && "$dir"/intervalexec 15 node $dir/out/advisorycircular.js --config "$config_path" --secrets "$secrets_path" --basestation-sqb "$sqb_path" --history "$history_path" --log-prefix "$instance") diff --git a/advisorycircular@.service b/advisorycircular@.service index a96a0cc..c1088b3 100644 --- a/advisorycircular@.service +++ b/advisorycircular@.service @@ -8,7 +8,7 @@ After=network.target Type=simple User=advisorycircular Restart=always -RestartSec=10s +RestartSec=30s ExecStart=/usr/local/share/advisorycircular/advisorycircular %i [Install]