more elegant response to too many requests
This commit is contained in:
parent
5fdff265ab
commit
293ce01383
1 changed files with 6 additions and 2 deletions
|
@ -4,10 +4,14 @@
|
||||||
|
|
||||||
main()
|
main()
|
||||||
{
|
{
|
||||||
while true
|
while tmux has-session &> /dev/null
|
||||||
do
|
do
|
||||||
./weather.sh > ~/.tmux/plugins/tmux-dracula/weather.txt
|
./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
|
done
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue