Skip to content

Commit

Permalink
Remove useful specs
Browse files Browse the repository at this point in the history
  • Loading branch information
meequrox committed Apr 20, 2024
1 parent 6eb5216 commit c59994d
Show file tree
Hide file tree
Showing 5 changed files with 1 addition and 21 deletions.
3 changes: 0 additions & 3 deletions lib/double_gis_monitor/application.ex
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,6 @@ defmodule DoubleGisMonitor.Application do
This callback is responsible for starting its supervision tree.
"""
@impl true
@callback start(term(), term()) ::
{:ok, pid()} | {:ok, pid(), state :: term()} | {:error, reason :: term()}
def start(_type, _args) do
Logger.info("Application started, cwd is #{File.cwd!()}")

Expand All @@ -27,7 +25,6 @@ defmodule DoubleGisMonitor.Application do
This callback is called after its supervision tree has been stopped.
"""
@impl true
@callback stop(term()) :: :ok
def stop(_state) do
Logger.info("Application stopped")
end
Expand Down
7 changes: 0 additions & 7 deletions lib/double_gis_monitor/event_poller.ex
Original file line number Diff line number Diff line change
Expand Up @@ -11,13 +11,6 @@ defmodule DoubleGisMonitor.EventPoller do
@doc """
Returns child specification for supervisor.
"""
@spec child_spec() :: %{
:id => atom() | term(),
:start => {module(), atom(), [term()]},
:restart => :permanent | :transient | :temporary,
:shutdown => timeout() | :brutal_kill,
:type => :worker | :supervisor
}
def child_spec() do
%{
id: __MODULE__,
Expand Down
8 changes: 0 additions & 8 deletions lib/double_gis_monitor/event_processor.ex
Original file line number Diff line number Diff line change
Expand Up @@ -11,13 +11,6 @@ defmodule DoubleGisMonitor.EventProcessor do
@doc """
Returns child specification for supervisor.
"""
@spec child_spec() :: %{
:id => atom() | term(),
:start => {module(), atom(), [term()]},
:restart => :permanent | :transient | :temporary,
:shutdown => timeout() | :brutal_kill,
:type => :worker | :supervisor
}
def child_spec() do
%{
id: __MODULE__,
Expand All @@ -28,7 +21,6 @@ defmodule DoubleGisMonitor.EventProcessor do
}
end

@spec start_link([]) :: {:error, any()} | {:ok, pid()}
def start_link([]) do
Agent.start_link(__MODULE__, :init, [], name: __MODULE__)
end
Expand Down
1 change: 0 additions & 1 deletion lib/double_gis_monitor/repo.ex
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,6 @@ defmodule DoubleGisMonitor.Repo do
{:ok, Enum.reduce(outdated_db_events, 0, reduce_fn)}
end

@spec insert_new(any()) :: list()
def insert_new(events) do
filter_fn = fn e -> ensure_inserted?(e) end
Enum.filter(events, filter_fn)
Expand Down
3 changes: 1 addition & 2 deletions lib/double_gis_monitor/supervisor.ex
Original file line number Diff line number Diff line change
Expand Up @@ -25,11 +25,10 @@ defmodule DoubleGisMonitor.Supervisor do
## Callbacks
#############

@impl true
@callback init(init_arg :: term()) :: {:ok, tuple()}
@doc """
Callback invoked to start the supervision tree.
"""
@impl true
def init([]) do
Logger.info("Supervisor started")

Expand Down

0 comments on commit c59994d

Please sign in to comment.