Fix Credo warnings

process-per-ip
Vinicius Brasil 4 years ago
parent b5ee824653
commit 852a832edd

@ -2,6 +2,8 @@ defmodule Plausible.ClickhouseEvent do
use Ecto.Schema
import Ecto.Changeset
@type t() :: %__MODULE__{}
@primary_key false
schema "events" do
field :name, :string

@ -3,7 +3,7 @@ defmodule Plausible.Ingestion.Event do
alias Plausible.Ingestion.{Request, CityOverrides}
@spec build(Request.t()) ::
{:ok, %Plausible.ClickhouseEvent{}} | :skip | {:error, Ecto.Changeset.t()}
{:ok, Plausible.ClickhouseEvent.t()} | :skip | {:error, Ecto.Changeset.t()}
@doc """
Builds events from %Plausible.Ingestion.Request{}. This function reads geolocation data and
parses the user agent string. Returns :skip if the request is identified as spam, or blocked.

@ -1,6 +1,6 @@
defmodule Plausible.Ingestion.Session do
@spec upsert_from_event(%Plausible.ClickhouseSession{} | nil, %Plausible.ClickhouseEvent{}) ::
%Plausible.ClickhouseSession{}
@spec upsert_from_event(Plausible.ClickhouseSession.t() | nil, Plausible.ClickhouseEvent.t()) ::
Plausible.ClickhouseSession.t()
@doc """
Builds and buffers a new session if it does not exist, or updates the existing one from an
event.

@ -2,6 +2,8 @@ defmodule Plausible.ClickhouseSession do
use Ecto.Schema
import Ecto.Changeset
@type t() :: %__MODULE__{}
@primary_key false
schema "sessions" do
field :hostname, :string

Loading…
Cancel
Save