Voile.Task.SuspensionExpiryScheduler (Voile v0.1.27)

Copy Markdown View Source

Scheduled task that automatically unsuspends users when their suspension period ends.

This task:

  • Runs daily (or at configured interval)
  • Checks for users with expired suspensions
  • Automatically sets manually_suspended to false
  • Logs the unsuspension action

Configuration:

  • Set scheduler interval: config :voile, :suspension_expiry_interval, :daily

Summary

Functions

Returns a specification to start this module under a supervisor.

Main function to check and process expired suspensions.

Manually trigger an expiry check (useful for testing).

Functions

child_spec(init_arg)

Returns a specification to start this module under a supervisor.

See Supervisor.

process_expired_suspensions()

Main function to check and process expired suspensions.

start_link(opts \\ [])

trigger_check()

Manually trigger an expiry check (useful for testing).