genstage

how to make a genserver to run with a frequency value Elixir

妖精的绣舞 提交于 2020-12-14 06:58:02
问题 I have seen many GenServer implementations, I am trying to create one with such specifications, But I am not sure its GenServer's use case. I have a state such as %{url: "abc.com/jpeg", name: "Camera1", id: :camera_one, frequency: 10} I have such 100 states, with different values, my use case contains on 5 steps. Start Each state as a Gen{ ? }. Send an HTTP request to that URL. Get results. Send another HTTP request with the data came from the first request. Put the Process to sleep. if the

how to make a genserver to run with a frequency value Elixir

丶灬走出姿态 提交于 2020-12-14 06:56:57
问题 I have seen many GenServer implementations, I am trying to create one with such specifications, But I am not sure its GenServer's use case. I have a state such as %{url: "abc.com/jpeg", name: "Camera1", id: :camera_one, frequency: 10} I have such 100 states, with different values, my use case contains on 5 steps. Start Each state as a Gen{ ? }. Send an HTTP request to that URL. Get results. Send another HTTP request with the data came from the first request. Put the Process to sleep. if the