fluminus_bot v0.1.0 FluminusBot.Worker.TokenRefresher View Source
The GenServer that is in charge of making sure all tokens in the database is up to date. Otherwise, it will ask the user to re-login.
The interval between each refresh is determined by the @interval
module attribute.
There is some stochastic element involved to be nice to the destination server.
The value is set to be 20 minutes currently.
Link to this section Summary
Functions
Returns a specification to start this module under a supervisor
Link to this section Functions
Link to this function
add_new_chat_id(chat_id)
View Source
add_new_chat_id(chat_id)
View Source
add_new_chat_id(integer()) :: {:ok, :new} | {:ok, :existing}
add_new_chat_id(integer()) :: {:ok, :new} | {:ok, :existing}
Link to this function
all_chat_ids()
View Source
all_chat_ids()
View Source
all_chat_ids() :: {:ok, [integer()]}
all_chat_ids() :: {:ok, [integer()]}
Link to this function
child_spec(init_arg) View Source
Returns a specification to start this module under a supervisor.
See Supervisor
.
Link to this function