PayDayLoan.LoadWorker (pay_day_loan v0.7.0)

Process to load requested keys into PDL cache.

Whenever this process receives a ping, it attempts to load a batch of keys. Requested keys are ones returned by a call to LoadState.requested_keys.

Pings should happen automatically via the PDL API. To force a ping manually, call GenServer.cast(pdl.load_worker, :ping).

Link to this section Summary

Functions

Returns a specification to start this module under a supervisor.

Start in a supervision tree

Link to this section Types

@type state() :: %{pdl: PayDayLoan.t(), load_task_ref: nil | reference()}

Link to this section Functions

Link to this function

child_spec(init_arg)

Returns a specification to start this module under a supervisor.

See Supervisor.

Link to this function

start_link(arg)

@spec start_link({PayDayLoan.t(), GenServer.options()}) :: GenServer.on_start()

Start in a supervision tree