Sovite.Core.Repo.Tables.IPAddressCounts (sovite v0.6.0)

Copy Markdown View Source

Messages sent per source address and day, for the warm-up schedules and daily limits of Sovite.Core.IPPools.

Summary

Functions

Adds messages to the count of address on day.

The counts of day, by address.

Deletes the counts of days before day. Returns how many.

Every count, newest day first.

Functions

add(repo, address, day, messages)

Adds messages to the count of address on day.

day(repo, day)

@spec day(Sovite.Core.Repo.t(), Date.t()) :: %{
  required(String.t()) => non_neg_integer()
}

The counts of day, by address.

delete_before(repo, day)

@spec delete_before(Sovite.Core.Repo.t(), Date.t()) :: non_neg_integer()

Deletes the counts of days before day. Returns how many.

list(repo)

Every count, newest day first.