farmbot v6.0.0 Farmbot.Repo.FarmEvent View Source

FarmEvent’s are events that happen on a schedule. When it is time for the event to execute one of several things may happen:

* A Regimen gets started.
* A Sequence will execute.

Link to this section Summary

Functions

Fetch all Elixir.Farmbot.Repo.FarmEvent’s from the Repo

Syncs all FarmEvent’s from the Farmbot Web App.

1) Fetches JSON from the API.
2) Parses JSON as a list of FarmEvent's.
3) For each record in the list, checks if the item exists already,
4) Inserts or Updates each item in the list into the Repo

Link to this section Functions

Link to this function changeset(farm_event, params \\ %{}) View Source

Fetch all Elixir.Farmbot.Repo.FarmEvent’s from the Repo.

Syncs all FarmEvent’s from the Farmbot Web App.

1) Fetches JSON from the API.
2) Parses JSON as a list of FarmEvent's.
3) For each record in the list, checks if the item exists already,
4) Inserts or Updates each item in the list into the Repo.