Skip to content

Commit

Permalink
Fixes/Rebase clean-up
Browse files Browse the repository at this point in the history
for a rebase
  • Loading branch information
gagandeepb committed Jul 25, 2024
1 parent 0d9e077 commit 2e2a964
Showing 1 changed file with 2 additions and 9 deletions.
11 changes: 2 additions & 9 deletions lib/trento/activity_log.ex
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@ defmodule Trento.ActivityLog do
Activity Log module provides functionality to manage activity log settings and track activity.
"""

import Ecto.Query

require Logger

alias Trento.ActivityLog.RetentionTime
Expand Down Expand Up @@ -41,15 +43,6 @@ defmodule Trento.ActivityLog do
end
end

@spec list_activity_log() :: list(ActivityLog.t())
def list_activity_log do
query =
from activity in ActivityLog,
order_by: [desc: activity.inserted_at]

Repo.all(query)
end

@spec clear_expired_logs() :: :ok | {:error, any()}
def clear_expired_logs do
with {:ok, %{retention_time: retention_time}} <- Trento.ActivityLog.get_settings(),
Expand Down

0 comments on commit 2e2a964

Please sign in to comment.