AshAuthentication.AuditLogResource.Expunger (ash_authentication v4.13.3)

View Source

A GenServer which removes old audit log entries once they're no longer relevant.

Scans all audit log resources based on their configured lifetime options.

defmodule MyApp.Accounts.AuditLog do
  use Ash.Resource,
    extensions: [AshAuthentication.AuditLogResource],
    domain: MyApp.Accounts

  audit_log do
    log_lifetime 90 # days
    expunge_interval 12 # hours
  end
end

This GenServer is started by the AshAuthentication.Supervisor which should be added to your app's supervision tree.

Summary

Functions

Returns a specification to start this module under a supervisor.

Functions

child_spec(init_arg)

Returns a specification to start this module under a supervisor.

See Supervisor.