defmodule Mix.Tasks.ExMoney.PurgeTokens do
  use Mix.Task

  @shortdoc "Purges stale Guardian tokens from a database"

  def run(_args) do
    {:ok, pid} = ExMoney.Repo.start_link

    GuardianDb.Token.purge_expired_tokens!

    ExMoney.Repo.stop(pid)
  end
end

Add a mix task to purge stale tokens
Add a mix task to purge stale tokens

gaynetdinov/ex_money,gaynetdinov/ex_money