View Source Glific.State.Simulator (Glific v5.1.6)

Manage simulator state and allocation to ensure we can have multiple simulators run at the same time

Link to this section Summary

Functions

Check if there is an available simulator for this user

Link to this section Functions

Link to this function

get_simulator(user, state)

View Source
@spec get_simulator(Glific.Users.User.t(), map()) ::
  {Glific.Contacts.Contact.t(), map()}

Check if there is an available simulator for this user

  • If available, return the free Simulator Contact (there are multiple simulator contacts per organization)
  • If none available, return nil