update robots.txt
This commit is contained in:
parent
1ef9e00a05
commit
2dc42a6cb7
2 changed files with 54 additions and 12 deletions
|
|
@ -277,7 +277,10 @@ defmodule Aprsme.Is do
|
||||||
if state.keepalive_timer, do: Process.cancel_timer(state.keepalive_timer)
|
if state.keepalive_timer, do: Process.cancel_timer(state.keepalive_timer)
|
||||||
:gen_tcp.close(socket)
|
:gen_tcp.close(socket)
|
||||||
schedule_reconnect(5000)
|
schedule_reconnect(5000)
|
||||||
{:reply, {:error, error}, %{state | socket: nil, timer: nil, keepalive_timer: nil}}
|
|
||||||
|
state = track_failure(%{state | socket: nil, timer: nil, keepalive_timer: nil})
|
||||||
|
|
||||||
|
{:reply, {:error, error}, state}
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
@ -405,8 +408,17 @@ defmodule Aprsme.Is do
|
||||||
# Schedule reconnect
|
# Schedule reconnect
|
||||||
schedule_reconnect(5000)
|
schedule_reconnect(5000)
|
||||||
|
|
||||||
{:noreply,
|
state =
|
||||||
%{state | socket: nil, timer: nil, keepalive_timer: nil, backpressure_active: false, safety_valve_timer: nil}}
|
track_failure(%{
|
||||||
|
state
|
||||||
|
| socket: nil,
|
||||||
|
timer: nil,
|
||||||
|
keepalive_timer: nil,
|
||||||
|
backpressure_active: false,
|
||||||
|
safety_valve_timer: nil
|
||||||
|
})
|
||||||
|
|
||||||
|
{:noreply, state}
|
||||||
end
|
end
|
||||||
|
|
||||||
def handle_info({:tcp_error, _socket, reason}, state) do
|
def handle_info({:tcp_error, _socket, reason}, state) do
|
||||||
|
|
@ -419,8 +431,17 @@ defmodule Aprsme.Is do
|
||||||
# Schedule reconnect
|
# Schedule reconnect
|
||||||
schedule_reconnect(5000)
|
schedule_reconnect(5000)
|
||||||
|
|
||||||
{:noreply,
|
state =
|
||||||
%{state | socket: nil, timer: nil, keepalive_timer: nil, backpressure_active: false, safety_valve_timer: nil}}
|
track_failure(%{
|
||||||
|
state
|
||||||
|
| socket: nil,
|
||||||
|
timer: nil,
|
||||||
|
keepalive_timer: nil,
|
||||||
|
backpressure_active: false,
|
||||||
|
safety_valve_timer: nil
|
||||||
|
})
|
||||||
|
|
||||||
|
{:noreply, state}
|
||||||
end
|
end
|
||||||
|
|
||||||
def handle_info(:reconnect, state) do
|
def handle_info(:reconnect, state) do
|
||||||
|
|
@ -440,26 +461,26 @@ defmodule Aprsme.Is do
|
||||||
keepalive_timer = create_keepalive_timer(@keepalive_interval)
|
keepalive_timer = create_keepalive_timer(@keepalive_interval)
|
||||||
|
|
||||||
{:noreply,
|
{:noreply,
|
||||||
%{
|
reset_failure(%{
|
||||||
state
|
state
|
||||||
| socket: socket,
|
| socket: socket,
|
||||||
timer: timer,
|
timer: timer,
|
||||||
keepalive_timer: keepalive_timer,
|
keepalive_timer: keepalive_timer,
|
||||||
backpressure_active: false,
|
backpressure_active: false,
|
||||||
safety_valve_timer: nil
|
safety_valve_timer: nil
|
||||||
}}
|
})}
|
||||||
|
|
||||||
error ->
|
error ->
|
||||||
Logger.warning("Failed to login to APRS-IS: #{inspect(error)}, will retry in 10 seconds")
|
Logger.warning("Failed to login to APRS-IS: #{inspect(error)}, will retry in 10 seconds")
|
||||||
:gen_tcp.close(socket)
|
:gen_tcp.close(socket)
|
||||||
schedule_reconnect(10_000)
|
schedule_reconnect(10_000)
|
||||||
{:noreply, state}
|
{:noreply, track_failure(state)}
|
||||||
end
|
end
|
||||||
|
|
||||||
error ->
|
error ->
|
||||||
Logger.warning("Unable to reconnect to APRS-IS: #{inspect(error)}, will retry in 10 seconds")
|
Logger.warning("Unable to reconnect to APRS-IS: #{inspect(error)}, will retry in 10 seconds")
|
||||||
schedule_reconnect(10_000)
|
schedule_reconnect(10_000)
|
||||||
{:noreply, state}
|
{:noreply, track_failure(state)}
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,27 @@
|
||||||
# See https://www.robotstxt.org/robotstxt.html for documentation on how to use the robots.txt file
|
# As a condition of accessing this website, you agree to abide by the following
|
||||||
#
|
# content signals:
|
||||||
# To ban all spiders from the entire site uncomment the next two lines:
|
|
||||||
|
# (a) If a Content-Signal = yes, you may collect content for the corresponding
|
||||||
|
# use.
|
||||||
|
# (b) If a Content-Signal = no, you may not collect content for the
|
||||||
|
# corresponding use.
|
||||||
|
# (c) If the website operator does not include a Content-Signal for a
|
||||||
|
# corresponding use, the website operator neither grants nor restricts
|
||||||
|
# permission via Content-Signal with respect to the corresponding use.
|
||||||
|
|
||||||
|
# The content signals and their meanings are:
|
||||||
|
|
||||||
|
# search: building a search index and providing search results (e.g., returning
|
||||||
|
# hyperlinks and short excerpts from your website's contents). Search does not
|
||||||
|
# include providing AI-generated search summaries.
|
||||||
|
# ai-input: inputting content into one or more AI models (e.g., retrieval
|
||||||
|
# augmented generation, grounding, or other real-time taking of content for
|
||||||
|
# generative AI search answers).
|
||||||
|
# ai-train: training or fine-tuning AI models.
|
||||||
|
|
||||||
|
# ANY RESTRICTIONS EXPRESSED VIA CONTENT SIGNALS ARE EXPRESS RESERVATIONS OF
|
||||||
|
# RIGHTS UNDER ARTICLE 4 OF THE EUROPEAN UNION DIRECTIVE 2019/790 ON COPYRIGHT
|
||||||
|
# AND RELATED RIGHTS IN THE DIGITAL SINGLE MARKET.
|
||||||
|
|
||||||
User-agent: *
|
User-agent: *
|
||||||
Content-Signal: search=yes,ai-train=no
|
Content-Signal: search=yes,ai-train=no
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue