more elegant response to too many requests

This commit is contained in:
Dane Williams 2020-03-15 10:18:59 -07:00
parent 5fdff265ab
commit 293ce01383

View file

@ -4,10 +4,14 @@
main()
{
while true
while tmux has-session &> /dev/null
do
./weather.sh > ~/.tmux/plugins/tmux-dracula/weather.txt
sleep 600
if [ (cat ~/.tmux/plugins/tmux-dracula/weather.txt | tail -1) = } ]; then
echo "Too Many Requests" > ~/.tmux/plugins/tmux-dracula/weather.txt
break
fi
sleep 1000
done
}