ChoreRunnerUI.ChoreLive (chore_runner v0.1.4)

A LiveView used in conjunction with ChoreRunner's regular functionality. Features logging and data value display of all running chores locally and on all connected nodes. Allows the running of chores (with autogenerated forms based on chore inputs), as well as stopping running chores.


Make sure that Chore.Supervisor is added in your application

children = [
  {Phoenix.PubSub, name: MyApp.PubSub},
  {ChoreRunner, pubsub: MyApp.PubSub}

A pubsub MUST BE RUNNING and configured for both the Chore supervisor and the Chore LiveView for the Chore UI to function.

Make the Chore LiveView accessible in your Phoenix web app, either in a template or in the router.


<%= live_render(@conn, ChoreRunnerUI.ChoreLive, session: %{"otp_app" => :my_app, "chore_root" => MyApp.Chores, "pubsub" => MyApp.PubSub}) %>


@chore_session %{
  "otp_app" => :my_app,
  "chore_root" => MyApp.Chores,
  "pubsub" => MyApp.PubSub
scope "/" do
  pipe_through :browser

  live_session :chores, session: @chore_session do
    live "/", ChoreRunnerUI.ChoreLive

The "chore_root" key in the session should be the module root that all of your chore modules use. For example: if your root is MyApp.Chores your chore modules should be named like MyApp.Chores.MyChore

Now you can visit the speficied url and start running chores!

Link to this section Summary

Link to this section Functions

Link to this function

handle_event(event, arg2, socket)

Callback implementation for Phoenix.LiveView.handle_event/3.

Link to this function

handle_info(unhandled, socket)

Callback implementation for Phoenix.LiveView.handle_info/2.

Link to this function

mount(params, session, socket)

Callback implementation for Phoenix.LiveView.mount/3.

Link to this function


Callback implementation for Phoenix.LiveView.render/1.