diff --git a/Lightning.Accounts.html b/Lightning.Accounts.html index 789eb3e4f0..a3f012da0d 100644 --- a/Lightning.Accounts.html +++ b/Lightning.Accounts.html @@ -827,10 +827,10 @@
iex> apply_user_email(user, "valid password", %{email: ...})
-{:ok, %User{}}role: :superuser
-iex> apply_user_email(user, "invalid password", %{email: ...})
-{:error, %Ecto.Changeset{}}
+iex> apply_user_email(user, "valid password", %{email: ...})
+{:ok, %User{}}role: :superuser
+iex> apply_user_email(user, "invalid password", %{email: ...})
+{:error, %Ecto.Changeset{}}
iex> change_scheduled_deletion(user)
-%Ecto.Changeset{data: %User{}}
+iex> change_scheduled_deletion(user)
+%Ecto.Changeset{data: %User{}}
iex> change_superuser_registration(user)
-%Ecto.Changeset{data: %User{}}
+iex> change_superuser_registration(user)
+%Ecto.Changeset{data: %User{}}
iex> change_user_email(user)
-%Ecto.Changeset{data: %User{}}
+iex> change_user_email(user)
+%Ecto.Changeset{data: %User{}}
iex> change_user_password(user)
-%Ecto.Changeset{data: %User{}}
+iex> change_user_password(user)
+%Ecto.Changeset{data: %User{}}
iex> change_user_registration(user)
-%Ecto.Changeset{data: %User{}}
+iex> change_user_registration(user)
+%Ecto.Changeset{data: %User{}}
iex> delete_token(token)
-{:ok, %UserToken{}}
+iex> delete_token(token)
+{:ok, %UserToken{}}
-iex> delete_token(token)
-{:error, %Ecto.Changeset{}}
+iex> delete_token(token)
+{:error, %Ecto.Changeset{}}
iex> delete_user(user)
-{:ok, %User{}}
+iex> delete_user(user)
+{:ok, %User{}}
-iex> delete_user(user)
-{:error, %Ecto.Changeset{}}
+iex> delete_user(user)
+{:error, %Ecto.Changeset{}}
iex> deliver_user_confirmation_instructions(user)
-{:ok, %{to: ..., body: ...}}
+iex> deliver_user_confirmation_instructions(user)
+{:ok, %{to: ..., body: ...}}
-iex> deliver_user_confirmation_instructions(confirmed_user)
-{:error, :already_confirmed}
+iex> deliver_user_confirmation_instructions(confirmed_user)
+{:error, :already_confirmed}
iex> deliver_user_reset_password_instructions(user, &Routes.user_reset_password_url(conn, :edit, &1))
-{:ok, %{to: ..., body: ...}}
+iex> deliver_user_reset_password_instructions(user, &Routes.user_reset_password_url(conn, :edit, &1))
+{:ok, %{to: ..., body: ...}}
iex> get_preference(user, "editor.orientation")
+iex> get_preference(user, "editor.orientation")
"vertical"
-iex> get_preference(user, "notifications.enabled")
+iex> get_preference(user, "notifications.enabled")
true
iex> get_token!(123)
-%UserToken{}
+iex> get_token!(123)
+%UserToken{}
-iex> get_token!(456)
+iex> get_token!(456)
** (Ecto.NoResultsError)
@@ -1577,10 +1577,10 @@ get_user(id)
Examples
-iex> get_user(123)
-%User{}
+iex> get_user(123)
+%User{}
-iex> get_user!(456)
+iex> get_user!(456)
nil
@@ -1675,10 +1675,10 @@ get_user_by_email(email)
Examples
-iex> get_user_by_email("foo@example.com")
-%User{}
+iex> get_user_by_email("foo@example.com")
+%User{}
-iex> get_user_by_email("unknown@example.com")
+iex> get_user_by_email("unknown@example.com")
nil
@@ -1707,10 +1707,10 @@ get_user_by_email_and_password(email, passw
Examples
-iex> get_user_by_email_and_password("foo@example.com", "correct_password")
-%User{}
+iex> get_user_by_email_and_password("foo@example.com", "correct_password")
+%User{}
-iex> get_user_by_email_and_password("foo@example.com", "invalid_password")
+iex> get_user_by_email_and_password("foo@example.com", "invalid_password")
nil
@@ -1739,10 +1739,10 @@ get_user_by_reset_password_token(token)
Examples
-iex> get_user_by_reset_password_token("validtoken")
-%User{}
+iex> get_user_by_reset_password_token("validtoken")
+%User{}
-iex> get_user_by_reset_password_token("invalidtoken")
+iex> get_user_by_reset_password_token("invalidtoken")
nil
@@ -1939,8 +1939,8 @@ list_users()
Examples
-iex> list_users()
-[%User{}, ...]
+iex> list_users()
+[%User{}, ...]
@@ -2069,11 +2069,11 @@ register_superuser(attrs)
Examples
-iex> register_superuser(%{field: value})
-{:ok, %User{}}
+iex> register_superuser(%{field: value})
+{:ok, %User{}}
-iex> register_superuser(%{field: bad_value})
-{:error, %Ecto.Changeset{}}
+iex> register_superuser(%{field: bad_value})
+{:error, %Ecto.Changeset{}}
@@ -2111,11 +2111,11 @@ register_user(attrs)
Examples
-iex> register_user(%{field: value})
-{:ok, %User{}}
+iex> register_user(%{field: value})
+{:ok, %User{}}
-iex> register_user(%{field: bad_value})
-{:error, %Ecto.Changeset{}}
+iex> register_user(%{field: bad_value})
+{:error, %Ecto.Changeset{}}
@@ -2165,7 +2165,7 @@ request_email_update(user, new_email)
Examples
-iex> request_email_update(user, new_email)
+iex> request_email_update(user, new_email)
:ok
@@ -2194,11 +2194,11 @@ reset_user_password(user, attrs)
Examples
-iex> reset_user_password(user, %{password: "new long password", password_confirmation: "new long password"})
-{:ok, %User{}}
+iex> reset_user_password(user, %{password: "new long password", password_confirmation: "new long password"})
+{:ok, %User{}}
-iex> reset_user_password(user, %{password: "valid", password_confirmation: "not the same"})
-{:error, %Ecto.Changeset{}}
+iex> reset_user_password(user, %{password: "valid", password_confirmation: "not the same"})
+{:error, %Ecto.Changeset{}}
@@ -2364,11 +2364,11 @@ update_user_password(user, password, attrs)
Examples
-iex> update_user_password(user, "valid password", %{password: ...})
-{:ok, %User{}}
+iex> update_user_password(user, "valid password", %{password: ...})
+{:ok, %User{}}
-iex> update_user_password(user, "invalid password", %{password: ...})
-{:error, %Ecto.Changeset{}}
+iex> update_user_password(user, "invalid password", %{password: ...})
+{:error, %Ecto.Changeset{}}
@@ -2403,11 +2403,11 @@ update_user_preference(user, key, value)
Examples
-iex> update_user_preference(user, "editor.orientation", "vertical")
-{:ok, %User{}}
+iex> update_user_preference(user, "editor.orientation", "vertical")
+{:ok, %User{}}
-iex> update_user_preference(user, "notifications.enabled", true)
-{:ok, %User{}}
+iex> update_user_preference(user, "notifications.enabled", true)
+{:ok, %User{}}
@@ -2442,7 +2442,7 @@ update_user_preferences(user, preferences)<
Examples
-iex> update_user_preferences(%User{}, %{"editor.orientaion" => "vertical"})
+iex> update_user_preferences(%User{}, %{"editor.orientaion" => "vertical"})
@@ -2569,8 +2569,8 @@ validate_change_user_email(user, params \\
Examples
-iex> validate_change_user_email(user, %{"email" => "new@example.com", "current_password" => "secret"})
-%Ecto.Changeset{...}
+iex> validate_change_user_email(user, %{"email" => "new@example.com", "current_password" => "secret"})
+%Ecto.Changeset{...}
diff --git a/Lightning.AdaptorRegistry.Npm.html b/Lightning.AdaptorRegistry.Npm.html
index d18a1dfd05..7c88dc293b 100644
--- a/Lightning.AdaptorRegistry.Npm.html
+++ b/Lightning.AdaptorRegistry.Npm.html
@@ -1692,14 +1692,14 @@ request(request)
Examples
-request = %HTTPoison.Request{
+request = %HTTPoison.Request{
method: :post,
url: "https://my.website.com",
body: "{\"foo\": 3}",
- headers: [{"Accept", "application/json"}]
-}
+ headers: [{"Accept", "application/json"}]
+}
-request(request)
+request(request)
@@ -1757,7 +1757,7 @@ request(method, url, body \\ "",
Examples
-request(:post, "https://my.website.com", "{\"foo\": 3}", [{"Accept", "application/json"}])
+request(:post, "https://my.website.com", "{\"foo\": 3}", [{"Accept", "application/json"}])
diff --git a/Lightning.AdaptorRegistry.html b/Lightning.AdaptorRegistry.html
index def861912c..d17c077308 100644
--- a/Lightning.AdaptorRegistry.html
+++ b/Lightning.AdaptorRegistry.html
@@ -141,9 +141,9 @@
Registry process to query and maintain a list of adaptors available for
writing jobs.
Currently it queries NPM for all modules in the @openfn
organization and
filters out modules that are known not to be adaptors.
Usage
# Starting the process
-AdaptorRegistry.start_link()
+AdaptorRegistry.start_link()
# Getting a list of all adaptors
-Lightning.AdaptorRegistry.AdaptorRegistry.all()
Caching
By default the results are cached to disk, and will be reused every start.
In order to disable or configure caching pass see: start_link/1
.
The process uses :continue
to return before the adaptors have been queried.
+
Lightning.AdaptorRegistry.AdaptorRegistry.all()
Caching
By default the results are cached to disk, and will be reused every start.
In order to disable or configure caching pass see: start_link/1
.
The process uses :continue
to return before the adaptors have been queried.
This does mean that the first call to the process will be delayed until
the handle_continue/2
has finished.
Timeouts
There is a 'general' timeout of 30s, this is used for GenServer calls like
all/1
and also internally when the modules are being queried. NPM can
@@ -434,10 +434,10 @@
resolve_package_name(package_name)
-Destructures an NPM style package name into module name and version.
Example
iex> resolve_package_name("@openfn/language-salesforce@1.2.3")
-{ "@openfn/language-salesforce", "1.2.3" }
-iex> resolve_package_name("@openfn/language-salesforce")
-{ "@openfn/language-salesforce", nil }
+Destructures an NPM style package name into module name and version.
Example
iex> resolve_package_name("@openfn/language-salesforce@1.2.3")
+{ "@openfn/language-salesforce", "1.2.3" }
+iex> resolve_package_name("@openfn/language-salesforce")
+{ "@openfn/language-salesforce", nil }
diff --git a/Lightning.AiAssistant.html b/Lightning.AiAssistant.html
index 2b2d542547..d84190f6f9 100644
--- a/Lightning.AiAssistant.html
+++ b/Lightning.AiAssistant.html
@@ -510,8 +510,8 @@ query(session, content)
-Queries the AI assistant with the given content.
Returns {:ok, session}
if the query was successful, otherwise :error
.
Example
iex> AiAssistant.query(session, "fn()")
-{:ok, session}
+Queries the AI assistant with the given content.
Returns {:ok, session}
if the query was successful, otherwise :error
.
Example
iex> AiAssistant.query(session, "fn()")
+{:ok, session}
diff --git a/Lightning.AuthProviders.OauthHTTPClient.html b/Lightning.AuthProviders.OauthHTTPClient.html
index 476d326eb5..1de8a58839 100644
--- a/Lightning.AuthProviders.OauthHTTPClient.html
+++ b/Lightning.AuthProviders.OauthHTTPClient.html
@@ -497,11 +497,11 @@ delete(client, url, opts)
-Perform a DELETE request.
See request/1
or request/2
for options definition.
delete("/users")
-delete("/users", query: [scope: "admin"])
-delete(client, "/users")
-delete(client, "/users", query: [scope: "admin"])
-delete(client, "/users", body: %{name: "Jon"})
+Perform a DELETE request.
See request/1
or request/2
for options definition.
delete("/users")
+delete("/users", query: [scope: "admin"])
+delete(client, "/users")
+delete(client, "/users", query: [scope: "admin"])
+delete(client, "/users", body: %{name: "Jon"})
@@ -530,11 +530,11 @@ delete!(client, url, opts)
-Perform a DELETE request.
See request!/1
or request!/2
for options definition.
delete!("/users")
-delete!("/users", query: [scope: "admin"])
-delete!(client, "/users")
-delete!(client, "/users", query: [scope: "admin"])
-delete!(client, "/users", body: %{name: "Jon"})
+Perform a DELETE request.
See request!/1
or request!/2
for options definition.
delete!("/users")
+delete!("/users", query: [scope: "admin"])
+delete!(client, "/users")
+delete!(client, "/users", query: [scope: "admin"])
+delete!(client, "/users", body: %{name: "Jon"})
@@ -664,11 +664,11 @@ get(client, url, opts)
-Perform a GET request.
See request/1
or request/2
for options definition.
get("/users")
-get("/users", query: [scope: "admin"])
-get(client, "/users")
-get(client, "/users", query: [scope: "admin"])
-get(client, "/users", body: %{name: "Jon"})
+Perform a GET request.
See request/1
or request/2
for options definition.
get("/users")
+get("/users", query: [scope: "admin"])
+get(client, "/users")
+get(client, "/users", query: [scope: "admin"])
+get(client, "/users", body: %{name: "Jon"})
@@ -697,11 +697,11 @@ get!(client, url, opts)
-Perform a GET request.
See request!/1
or request!/2
for options definition.
get!("/users")
-get!("/users", query: [scope: "admin"])
-get!(client, "/users")
-get!(client, "/users", query: [scope: "admin"])
-get!(client, "/users", body: %{name: "Jon"})
+Perform a GET request.
See request!/1
or request!/2
for options definition.
get!("/users")
+get!("/users", query: [scope: "admin"])
+get!(client, "/users")
+get!(client, "/users", query: [scope: "admin"])
+get!(client, "/users", body: %{name: "Jon"})
@@ -729,11 +729,11 @@ head(client, url, opts)
-Perform a HEAD request.
See request/1
or request/2
for options definition.
head("/users")
-head("/users", query: [scope: "admin"])
-head(client, "/users")
-head(client, "/users", query: [scope: "admin"])
-head(client, "/users", body: %{name: "Jon"})
+Perform a HEAD request.
See request/1
or request/2
for options definition.
head("/users")
+head("/users", query: [scope: "admin"])
+head(client, "/users")
+head(client, "/users", query: [scope: "admin"])
+head(client, "/users", body: %{name: "Jon"})
@@ -762,11 +762,11 @@ head!(client, url, opts)
-Perform a HEAD request.
See request!/1
or request!/2
for options definition.
head!("/users")
-head!("/users", query: [scope: "admin"])
-head!(client, "/users")
-head!(client, "/users", query: [scope: "admin"])
-head!(client, "/users", body: %{name: "Jon"})
+Perform a HEAD request.
See request!/1
or request!/2
for options definition.
head!("/users")
+head!("/users", query: [scope: "admin"])
+head!(client, "/users")
+head!(client, "/users", query: [scope: "admin"])
+head!(client, "/users", body: %{name: "Jon"})
@@ -794,11 +794,11 @@ options(client, url, opts)
-Perform a OPTIONS request.
See request/1
or request/2
for options definition.
options("/users")
-options("/users", query: [scope: "admin"])
-options(client, "/users")
-options(client, "/users", query: [scope: "admin"])
-options(client, "/users", body: %{name: "Jon"})
+Perform a OPTIONS request.
See request/1
or request/2
for options definition.
options("/users")
+options("/users", query: [scope: "admin"])
+options(client, "/users")
+options(client, "/users", query: [scope: "admin"])
+options(client, "/users", body: %{name: "Jon"})
@@ -827,11 +827,11 @@ options!(client, url, opts)
-Perform a OPTIONS request.
See request!/1
or request!/2
for options definition.
options!("/users")
-options!("/users", query: [scope: "admin"])
-options!(client, "/users")
-options!(client, "/users", query: [scope: "admin"])
-options!(client, "/users", body: %{name: "Jon"})
+Perform a OPTIONS request.
See request!/1
or request!/2
for options definition.
options!("/users")
+options!("/users", query: [scope: "admin"])
+options!(client, "/users")
+options!(client, "/users", query: [scope: "admin"])
+options!(client, "/users", body: %{name: "Jon"})
@@ -860,10 +860,10 @@ patch(client, url, body, opts)
-Perform a PATCH request.
See request/1
or request/2
for options definition.
patch("/users", %{name: "Jon"})
-patch("/users", %{name: "Jon"}, query: [scope: "admin"])
-patch(client, "/users", %{name: "Jon"})
-patch(client, "/users", %{name: "Jon"}, query: [scope: "admin"])
+Perform a PATCH request.
See request/1
or request/2
for options definition.
patch("/users", %{name: "Jon"})
+patch("/users", %{name: "Jon"}, query: [scope: "admin"])
+patch(client, "/users", %{name: "Jon"})
+patch(client, "/users", %{name: "Jon"}, query: [scope: "admin"])
@@ -892,10 +892,10 @@ patch!(client, url, body, opts)
-Perform a PATCH request.
See request!/1
or request!/2
for options definition.
patch!("/users", %{name: "Jon"})
-patch!("/users", %{name: "Jon"}, query: [scope: "admin"])
-patch!(client, "/users", %{name: "Jon"})
-patch!(client, "/users", %{name: "Jon"}, query: [scope: "admin"])
+Perform a PATCH request.
See request!/1
or request!/2
for options definition.
patch!("/users", %{name: "Jon"})
+patch!("/users", %{name: "Jon"}, query: [scope: "admin"])
+patch!(client, "/users", %{name: "Jon"})
+patch!(client, "/users", %{name: "Jon"}, query: [scope: "admin"])
@@ -924,10 +924,10 @@ post(client, url, body, opts)
-Perform a POST request.
See request/1
or request/2
for options definition.
post("/users", %{name: "Jon"})
-post("/users", %{name: "Jon"}, query: [scope: "admin"])
-post(client, "/users", %{name: "Jon"})
-post(client, "/users", %{name: "Jon"}, query: [scope: "admin"])
+Perform a POST request.
See request/1
or request/2
for options definition.
post("/users", %{name: "Jon"})
+post("/users", %{name: "Jon"}, query: [scope: "admin"])
+post(client, "/users", %{name: "Jon"})
+post(client, "/users", %{name: "Jon"}, query: [scope: "admin"])
@@ -956,10 +956,10 @@ post!(client, url, body, opts)
-Perform a POST request.
See request!/1
or request!/2
for options definition.
post!("/users", %{name: "Jon"})
-post!("/users", %{name: "Jon"}, query: [scope: "admin"])
-post!(client, "/users", %{name: "Jon"})
-post!(client, "/users", %{name: "Jon"}, query: [scope: "admin"])
+Perform a POST request.
See request!/1
or request!/2
for options definition.
post!("/users", %{name: "Jon"})
+post!("/users", %{name: "Jon"}, query: [scope: "admin"])
+post!(client, "/users", %{name: "Jon"})
+post!(client, "/users", %{name: "Jon"}, query: [scope: "admin"])
@@ -988,10 +988,10 @@ put(client, url, body, opts)
-Perform a PUT request.
See request/1
or request/2
for options definition.
put("/users", %{name: "Jon"})
-put("/users", %{name: "Jon"}, query: [scope: "admin"])
-put(client, "/users", %{name: "Jon"})
-put(client, "/users", %{name: "Jon"}, query: [scope: "admin"])
+Perform a PUT request.
See request/1
or request/2
for options definition.
put("/users", %{name: "Jon"})
+put("/users", %{name: "Jon"}, query: [scope: "admin"])
+put(client, "/users", %{name: "Jon"})
+put(client, "/users", %{name: "Jon"}, query: [scope: "admin"])
@@ -1020,10 +1020,10 @@ put!(client, url, body, opts)
-Perform a PUT request.
See request!/1
or request!/2
for options definition.
put!("/users", %{name: "Jon"})
-put!("/users", %{name: "Jon"}, query: [scope: "admin"])
-put!(client, "/users", %{name: "Jon"})
-put!(client, "/users", %{name: "Jon"}, query: [scope: "admin"])
+Perform a PUT request.
See request!/1
or request!/2
for options definition.
put!("/users", %{name: "Jon"})
+put!("/users", %{name: "Jon"}, query: [scope: "admin"])
+put!(client, "/users", %{name: "Jon"})
+put!(client, "/users", %{name: "Jon"}, query: [scope: "admin"])
@@ -1099,11 +1099,11 @@ request(client \\ %Tesla.Client{}, options)
Examples
-ExampleApi.request(method: :get, url: "/users/path")
+ExampleApi.request(method: :get, url: "/users/path")
# use shortcut methods
-ExampleApi.get("/users/1")
-ExampleApi.post(client, "/users", %{name: "Jon"})
+ExampleApi.get("/users/1")
+ExampleApi.post(client, "/users", %{name: "Jon"})
@@ -1239,11 +1239,11 @@ trace(client, url, opts)
-Perform a TRACE request.
See request/1
or request/2
for options definition.
trace("/users")
-trace("/users", query: [scope: "admin"])
-trace(client, "/users")
-trace(client, "/users", query: [scope: "admin"])
-trace(client, "/users", body: %{name: "Jon"})
+Perform a TRACE request.
See request/1
or request/2
for options definition.
trace("/users")
+trace("/users", query: [scope: "admin"])
+trace(client, "/users")
+trace(client, "/users", query: [scope: "admin"])
+trace(client, "/users", body: %{name: "Jon"})
@@ -1272,11 +1272,11 @@ trace!(client, url, opts)
-Perform a TRACE request.
See request!/1
or request!/2
for options definition.
trace!("/users")
-trace!("/users", query: [scope: "admin"])
-trace!(client, "/users")
-trace!(client, "/users", query: [scope: "admin"])
-trace!(client, "/users", body: %{name: "Jon"})
+Perform a TRACE request.
See request!/1
or request!/2
for options definition.
trace!("/users")
+trace!("/users", query: [scope: "admin"])
+trace!(client, "/users")
+trace!(client, "/users", query: [scope: "admin"])
+trace!(client, "/users", body: %{name: "Jon"})
diff --git a/Lightning.AuthProviders.WellKnown.html b/Lightning.AuthProviders.WellKnown.html
index 6f23bda7cd..0b8d154551 100644
--- a/Lightning.AuthProviders.WellKnown.html
+++ b/Lightning.AuthProviders.WellKnown.html
@@ -1868,14 +1868,14 @@ request(request)
Examples
-request = %HTTPoison.Request{
+request = %HTTPoison.Request{
method: :post,
url: "https://my.website.com",
body: "{\"foo\": 3}",
- headers: [{"Accept", "application/json"}]
-}
+ headers: [{"Accept", "application/json"}]
+}
-request(request)
+request(request)
@@ -1933,7 +1933,7 @@ request(method, url, body \\ "",
Examples
-request(:post, "https://my.website.com", "{\"foo\": 3}", [{"Accept", "application/json"}])
+request(:post, "https://my.website.com", "{\"foo\": 3}", [{"Accept", "application/json"}])
diff --git a/Lightning.BuildMacros.html b/Lightning.BuildMacros.html
index 2e24167908..696c89480b 100644
--- a/Lightning.BuildMacros.html
+++ b/Lightning.BuildMacros.html
@@ -213,13 +213,13 @@ do_in(envs, list)
Examples
-do_in(:dev) do
- IO.puts("This will only be printed in the dev environment")
-end
+do_in(:dev) do
+ IO.puts("This will only be printed in the dev environment")
+end
-do_in([:dev, :test]) do
- IO.puts("This will only be printed in the dev and test environments")
-end
+do_in([:dev, :test]) do
+ IO.puts("This will only be printed in the dev and test environments")
+end
diff --git a/Lightning.CLI.Result.html b/Lightning.CLI.Result.html
index 923078fe2e..bc18fb7fa3 100644
--- a/Lightning.CLI.Result.html
+++ b/Lightning.CLI.Result.html
@@ -145,7 +145,7 @@
Logs
The OpenFn CLI returns JSON formatted log lines, which are decoded and added
-to a Result
struct.
There are two kinds of output:
{"level":"<<level>>","name":"<<module>>","message":"..."],"time":<<timestamp>>}
These are usually for general logging, and debugging.
{"message":["<<message|filepath|output>>"]}
The above is the equivalent of the output of a command
+to a Result
struct.There are two kinds of output:
{"level":"<<level>>","name":"<<module>>","message":"..."],"time":<<timestamp>>}
These are usually for general logging, and debugging.
{"message":["<<message|filepath|output>>"]}
The above is the equivalent of the output of a command
diff --git a/Lightning.Collections.html b/Lightning.Collections.html
index b39a2bfad5..04848bf329 100644
--- a/Lightning.Collections.html
+++ b/Lightning.Collections.html
@@ -308,11 +308,11 @@ create_collection(attrs)
Examples
-iex> create_collection(%{name: "New Collection", description: "Description here"})
-{:ok, %Collection{}}
+iex> create_collection(%{name: "New Collection", description: "Description here"})
+{:ok, %Collection{}}
-iex> create_collection(%{name: nil})
-{:error, %Ecto.Changeset{}}
+
iex> create_collection(%{name: nil})
+{:error, %Ecto.Changeset{}}
@@ -569,11 +569,11 @@ list_collections(opts \\ [])
Examples
-iex> list_collections()
-[%Collection{}, ...]
+iex> list_collections()
+[%Collection{}, ...]
-iex> list_collections(order_by: [asc: :inserted_at], preload: [:project, :user])
-[%Collection{}, ...]
+
iex> list_collections(order_by: [asc: :inserted_at], preload: [:project, :user])
+[%Collection{}, ...]
@@ -678,11 +678,11 @@ update_collection(collection, attrs)
Examples
-iex> update_collection(collection, %{name: "Updated Name"})
-{:ok, %Collection{}}
+iex> update_collection(collection, %{name: "Updated Name"})
+{:ok, %Collection{}}
-iex> update_collection(collection, %{name: nil})
-{:error, %Ecto.Changeset{}}
+
iex> update_collection(collection, %{name: nil})
+{:error, %Ecto.Changeset{}}
diff --git a/Lightning.Config.Bootstrap.html b/Lightning.Config.Bootstrap.html
index 3a049e12ae..07c070f9c0 100644
--- a/Lightning.Config.Bootstrap.html
+++ b/Lightning.Config.Bootstrap.html
@@ -144,8 +144,8 @@
called from other places (aside from config/runtime.exs
) file.Sourcing envs
Internally this module uses Dotenvy.source/1
to source environment variables
from the .env
, .env.<config_env>
, and .env.<config_env>.override
files.
It also sources the system environment variables.
Calling configure/0
without calling source_envs/0
or Dotenvy.source/2
-first will result in no environment variables being loaded.
Usage:
Lightning.Config.Bootstrap.source_envs()
-Lightning.Config.Bootstrap.configure()
+first will result in no environment variables being loaded.Usage:
Lightning.Config.Bootstrap.source_envs()
+Lightning.Config.Bootstrap.configure()
diff --git a/Lightning.Credentials.html b/Lightning.Credentials.html
index 58b770a542..914e493400 100644
--- a/Lightning.Credentials.html
+++ b/Lightning.Credentials.html
@@ -408,8 +408,8 @@ change_credential(credential, attrs \\ %{})
Examples
-iex> change_credential(credential)
-%Ecto.Changeset{data: %Credential{}}
+iex> change_credential(credential)
+%Ecto.Changeset{data: %Credential{}}
@@ -439,11 +439,11 @@ create_credential(attrs \\ %{})
Examples
-iex> create_credential(%{field: value})
-{:ok, %Credential{}}
+iex> create_credential(%{field: value})
+{:ok, %Credential{}}
-iex> create_credential(%{field: bad_value})
-{:error, %Ecto.Changeset{}}
+iex> create_credential(%{field: bad_value})
+{:error, %Ecto.Changeset{}}
@@ -471,11 +471,11 @@ delete_credential(credential)
Examples
-iex> delete_credential(credential)
-{:ok, %Credential{}}
+iex> delete_credential(credential)
+{:ok, %Credential{}}
-iex> delete_credential(credential)
-{:error, %Ecto.Changeset{}}
+iex> delete_credential(credential)
+{:error, %Ecto.Changeset{}}
@@ -503,10 +503,10 @@ get_credential!(id)
Examples
-iex> get_credential!(123)
-%Credential{}
+iex> get_credential!(123)
+%Credential{}
-iex> get_credential!(456)
+iex> get_credential!(456)
** (Ecto.NoResultsError)
@@ -619,10 +619,10 @@ has_activity_in_projects?(credential)
Examples
-iex> has_activity_in_projects?(%Credential{id: some_id})
+iex> has_activity_in_projects?(%Credential{id: some_id})
true
-iex> has_activity_in_projects?(%Credential{id: another_id})
+iex> has_activity_in_projects?(%Credential{id: another_id})
false
@@ -661,11 +661,11 @@ invalid_projects_for_user(credential_id, us
Examples
-iex> can_credential_be_shared_to_user(credential_id, user_id)
-[]
+iex> can_credential_be_shared_to_user(credential_id, user_id)
+[]
-iex> can_credential_be_shared_to_user(credential_id, user_id)
-["52ea8758-6ce5-43d7-912f-6a1e1f11dc55"]
+iex> can_credential_be_shared_to_user(credential_id, user_id)
+["52ea8758-6ce5-43d7-912f-6a1e1f11dc55"]
@@ -705,9 +705,9 @@ list_credentials(project)
Examples
- When given a Project:
iex> list_credentials(%Project{id: 1})
-[%Credential{project_id: 1}, %Credential{project_id: 1}]
When given a User:
iex> list_credentials(%User{id: 123})
-[%Credential{user_id: 123}, %Credential{user_id: 123}]
+ When given a Project:
iex> list_credentials(%Project{id: 1})
+[%Credential{project_id: 1}, %Credential{project_id: 1}]
When given a User:
iex> list_credentials(%User{id: 123})
+[%Credential{user_id: 123}, %Credential{user_id: 123}]
@@ -818,11 +818,11 @@ schedule_credential_deletion(credential)
Examples
-iex> schedule_credential_deletion(%Credential{id: some_id})
-{:ok, %Credential{}}
+iex> schedule_credential_deletion(%Credential{id: some_id})
+{:ok, %Credential{}}
-iex> schedule_credential_deletion(%Credential{})
-{:error, %Ecto.Changeset{}}
+iex> schedule_credential_deletion(%Credential{})
+{:error, %Ecto.Changeset{}}
@@ -879,11 +879,11 @@ update_credential(credential, attrs)
Examples
-iex> update_credential(credential, %{field: new_value})
-{:ok, %Credential{}}
+iex> update_credential(credential, %{field: new_value})
+{:ok, %Credential{}}
-iex> update_credential(credential, %{field: bad_value})
-{:error, %Ecto.Changeset{}}
+iex> update_credential(credential, %{field: bad_value})
+{:error, %Ecto.Changeset{}}
diff --git a/Lightning.Helpers.html b/Lightning.Helpers.html
index c9a728f439..58a71684a4 100644
--- a/Lightning.Helpers.html
+++ b/Lightning.Helpers.html
@@ -327,10 +327,10 @@ copy_error(changeset, original_key, new_key
Example
-iex> changeset = %Ecto.Changeset{errors: [name: {"has already been taken", []}]}
-iex> updated_changeset = Lightning.Helpers.copy_error(changeset, :name, :raw_name)
+iex> changeset = %Ecto.Changeset{errors: [name: {"has already been taken", []}]}
+iex> updated_changeset = Lightning.Helpers.copy_error(changeset, :name, :raw_name)
iex> updated_changeset.errors
-[name: {"has already been taken", []}, raw_name: {"has already been taken", []}]
If the original_key
doesn't exist in the errors, or if the new_key
already exists and overwrite
is set to false
, the changeset is returned unchanged.
+[name: {"has already been taken", []}, raw_name: {"has already been taken", []}]
If the original_key
doesn't exist in the errors, or if the new_key
already exists and overwrite
is set to false
, the changeset is returned unchanged.
@@ -449,10 +449,10 @@ url_safe_name(name)
Examples
-iex> url_safe_name("My Project!!")
+iex> url_safe_name("My Project!!")
"my-project"
-iex> url_safe_name(nil)
+iex> url_safe_name(nil)
""
diff --git a/Lightning.Invocation.html b/Lightning.Invocation.html
index 836065ad45..dacf49b854 100644
--- a/Lightning.Invocation.html
+++ b/Lightning.Invocation.html
@@ -521,8 +521,8 @@ change_dataclip(dataclip, attrs \\ %{})
Examples
-iex> change_dataclip(dataclip)
-%Ecto.Changeset{data: %Dataclip{}}
+iex> change_dataclip(dataclip)
+%Ecto.Changeset{data: %Dataclip{}}
@@ -552,8 +552,8 @@ change_step(step, attrs \\ %{})
Examples
-iex> change_step(step)
-%Ecto.Changeset{data: %Step{}}
+iex> change_step(step)
+%Ecto.Changeset{data: %Step{}}
@@ -613,11 +613,11 @@ create_dataclip(attrs \\ %{})
Examples
-iex> create_dataclip(%{field: value})
-{:ok, %Dataclip{}}
+iex> create_dataclip(%{field: value})
+{:ok, %Dataclip{}}
-iex> create_dataclip(%{field: bad_value})
-{:error, %Ecto.Changeset{}}
+iex> create_dataclip(%{field: bad_value})
+{:error, %Ecto.Changeset{}}
@@ -645,11 +645,11 @@ delete_dataclip(dataclip)
Examples
-iex> delete_dataclip(dataclip)
-{:ok, %Dataclip{}}
+iex> delete_dataclip(dataclip)
+{:ok, %Dataclip{}}
-iex> delete_dataclip(dataclip)
-{:error, %Ecto.Changeset{}}
+iex> delete_dataclip(dataclip)
+{:error, %Ecto.Changeset{}}
@@ -684,14 +684,14 @@ get_dataclip(step)
Examples
-iex> get_dataclip("27b73932-16c7-4a72-86a3-85d805ccff98")
-%Dataclip{}
+iex> get_dataclip("27b73932-16c7-4a72-86a3-85d805ccff98")
+%Dataclip{}
-iex> get_dataclip("27b73932-16c7-4a72-86a3-85d805ccff98")
+iex> get_dataclip("27b73932-16c7-4a72-86a3-85d805ccff98")
nil
-iex> get_dataclip(%Step{id: "a uuid"})
-%Dataclip{}
+iex> get_dataclip(%Step{id: "a uuid"})
+%Dataclip{}
@@ -725,10 +725,10 @@ get_dataclip!(id)
Examples
-iex> get_dataclip!(123)
-%Dataclip{}
+iex> get_dataclip!(123)
+%Dataclip{}
-iex> get_dataclip!(456)
+iex> get_dataclip!(456)
** (Ecto.NoResultsError)
@@ -926,10 +926,10 @@ get_step!(id)
Examples
-iex> get_step!(123)
-%Step{}
+iex> get_step!(123)
+%Step{}
-iex> get_step!(456)
+iex> get_step!(456)
** (Ecto.NoResultsError)
@@ -1058,8 +1058,8 @@ list_dataclips()
Examples
-iex> list_dataclips()
-[%Dataclip{}, ...]
+iex> list_dataclips()
+[%Dataclip{}, ...]
@@ -1168,8 +1168,8 @@ list_steps()
Examples
-iex> list_steps()
-[%Step{}, ...]
+iex> list_steps()
+[%Step{}, ...]
@@ -1296,7 +1296,7 @@ search_workorders(project)
Example:
-search_workorders(%Project{id: 1}, %SearchParams{status: ["completed"]})
+search_workorders(%Project{id: 1}, %SearchParams{status: ["completed"]})
@@ -1402,11 +1402,11 @@ update_dataclip(dataclip, attrs)
Examples
-iex> update_dataclip(dataclip, %{field: new_value})
-{:ok, %Dataclip{}}
+iex> update_dataclip(dataclip, %{field: new_value})
+{:ok, %Dataclip{}}
-iex> update_dataclip(dataclip, %{field: bad_value})
-{:error, %Ecto.Changeset{}}
+iex> update_dataclip(dataclip, %{field: bad_value})
+{:error, %Ecto.Changeset{}}
diff --git a/Lightning.Jobs.html b/Lightning.Jobs.html
index 010b29094f..7624fba763 100644
--- a/Lightning.Jobs.html
+++ b/Lightning.Jobs.html
@@ -308,8 +308,8 @@ change_job(job, attrs \\ %{})
Examples
-iex> change_job(job)
-%Ecto.Changeset{data: %Job{}}
+iex> change_job(job)
+%Ecto.Changeset{data: %Job{}}
@@ -339,11 +339,11 @@ create_job(attrs \\ %{})
Examples
-iex> create_job(%{field: value})
-{:ok, %Job{}}
+iex> create_job(%{field: value})
+{:ok, %Job{}}
-iex> create_job(%{field: bad_value})
-{:error, %Ecto.Changeset{}}
+iex> create_job(%{field: bad_value})
+{:error, %Ecto.Changeset{}}
@@ -407,10 +407,10 @@ get_job!(id)
Examples
-iex> get_job!(123)
-%Job{}
+iex> get_job!(123)
+%Job{}
-iex> get_job!(456)
+iex> get_job!(456)
** (Ecto.NoResultsError)
@@ -622,11 +622,11 @@ update_job(job, attrs)
Examples
-iex> update_job(job, %{field: new_value})
-{:ok, %Job{}}
+iex> update_job(job, %{field: new_value})
+{:ok, %Job{}}
-iex> update_job(job, %{field: bad_value})
-{:error, %Ecto.Changeset{}}
+iex> update_job(job, %{field: bad_value})
+{:error, %Ecto.Changeset{}}
diff --git a/Lightning.KafkaTriggers.MessageRecovery.html b/Lightning.KafkaTriggers.MessageRecovery.html
index 2e59d803fe..0410640b7d 100644
--- a/Lightning.KafkaTriggers.MessageRecovery.html
+++ b/Lightning.KafkaTriggers.MessageRecovery.html
@@ -153,7 +153,7 @@
an error during reprocessing. These files can be reprocessed if you think the
error was transient.
Usage:
alias Lightning.KafkaTriggers.MessageRecovery
case MessageRecovery.recover_messages(Lightning.Config.kafka_alternate_storage_file_path) do
:ok -> # Success code
-{:error, error_count} -> # Failure code
end
+{:error, error_count} -> # Failure code
end
diff --git a/Lightning.OauthClients.html b/Lightning.OauthClients.html
index 726809439f..51ad465488 100644
--- a/Lightning.OauthClients.html
+++ b/Lightning.OauthClients.html
@@ -269,8 +269,8 @@ change_client(client, attrs \\ %{})
Examples
-iex> change_client(%OauthClient{}, %{name: "New Client"})
-%Ecto.Changeset{...}
+iex> change_client(%OauthClient{}, %{name: "New Client"})
+%Ecto.Changeset{...}
@@ -355,11 +355,11 @@ delete_client(client)
Examples
-iex> delete_client(client)
-{:ok, %OauthClient{}}
+iex> delete_client(client)
+{:ok, %OauthClient{}}
-iex> delete_client(client)
-{:error, %Ecto.Changeset{}}
+iex> delete_client(client)
+{:error, %Ecto.Changeset{}}
@@ -405,10 +405,10 @@ get_client!(id)
Examples
-iex> get_client!(123)
-%OauthClient{}
+iex> get_client!(123)
+%OauthClient{}
-iex> get_client!(456)
+iex> get_client!(456)
** (Ecto.NoResultsError)
@@ -449,9 +449,9 @@ list_clients(project)
Examples
- When given a Project:
iex> list_clients(%Project{id: 1})
-[%OauthClient{project_id: 1}, %OauthClient{project_id: 1}]
When given a User:
iex> list_clients(%User{id: 123})
-[%OauthClient{user_id: 123}, %OauthClient{user_id: 123}]
+ When given a Project:
iex> list_clients(%Project{id: 1})
+[%OauthClient{project_id: 1}, %OauthClient{project_id: 1}]
When given a User:
iex> list_clients(%User{id: 123})
+[%OauthClient{user_id: 123}, %OauthClient{user_id: 123}]
@@ -491,11 +491,11 @@ update_client(client, attrs)
Examples
-iex> update_client(client, %{field: new_value})
-{:ok, %OauthClient{}}
+iex> update_client(client, %{field: new_value})
+{:ok, %OauthClient{}}
-iex> update_client(client, %{field: bad_value})
-{:error, %Ecto.Changeset{}}
+iex> update_client(client, %{field: bad_value})
+{:error, %Ecto.Changeset{}}
diff --git a/Lightning.Policies.Permissions.html b/Lightning.Policies.Permissions.html
index 99dd76756e..890376b309 100644
--- a/Lightning.Policies.Permissions.html
+++ b/Lightning.Policies.Permissions.html
@@ -139,13 +139,13 @@
This module defines a unique interface managing authorizations in Lightning.
Users in Lightning have instance-wide and project-wide roles which determine their level of access to resources in the application. Fo rmore details see the documentation.
These authorizations policies are all implemented under the lib/lightning/policies
folder. In that folder you can find 3 files:
- The
users.ex
file has all the policies for the instances wide access levels - The
project_users.ex
file has all the policies for the project wide access levels - The
permissions.ex
file defines the Lightning.Policies.Permissions.can/4
interface. Which is a wrapper around the Bodyguard.permit/4
function.
-We use that interface to be able to harmonize the use of policies accross the entire app.
All the policies are tested in the test/lightning/policies
folder. And the test are written in a way that allows the reader to quickly who can do what in the app.
We have two variants of the Lightning.Policies.Permissions.can/4
interface:
Lightning.Policies.Permissions.can(policy, action, actor, resource)
returns :ok
if the actor can perform the action on the resource and {:error, :unauthorized}
otherwise.Lightning.Policies.Permissions.can?(policy, action, actor, resource)
returns true
if the actor can perform the action on the resource and false
otherwise.
Here is an example of how we the Lightning.Policies.Permissions.can/4
interface to check if the a user can edit a job or not
can_edit_workflow = Lightning.Policies.ProjectUsers |> Lightning.Policies.Permissions.can?(:edit_workflow, socket.assigns.current_user, socket.assigns.project)
+We use that interface to be able to harmonize the use of policies accross the entire app.All the policies are tested in the test/lightning/policies
folder. And the test are written in a way that allows the reader to quickly who can do what in the app.
We have two variants of the Lightning.Policies.Permissions.can/4
interface:
Lightning.Policies.Permissions.can(policy, action, actor, resource)
returns :ok
if the actor can perform the action on the resource and {:error, :unauthorized}
otherwise.Lightning.Policies.Permissions.can?(policy, action, actor, resource)
returns true
if the actor can perform the action on the resource and false
otherwise.
Here is an example of how we the Lightning.Policies.Permissions.can/4
interface to check if the a user can edit a job or not
can_edit_workflow = Lightning.Policies.ProjectUsers |> Lightning.Policies.Permissions.can?(:edit_workflow, socket.assigns.current_user, socket.assigns.project)
-if can_edit_workflow do
+if can_edit_workflow do
# allow user to edit the workflow
-else
+else
# quick user out
-end
+end
@@ -222,11 +222,11 @@ can(policy, action, user, params \\ [])
Examples
-iex> can(Lightning.Policies.Users, :create_workflow, user, project)
+iex> can(Lightning.Policies.Users, :create_workflow, user, project)
:ok
-iex> can(Lightning.Policies.Users, :create_project, user, %{})
-{:error, :unauthorized}
+iex> can(Lightning.Policies.Users, :create_project, user, %{})
+{:error, :unauthorized}
@@ -256,10 +256,10 @@ can?(policy, action, user, params \\ [])
Examples
-iex> can(Lightning.Policies.Users, :create_workflow, user, project)
+iex> can(Lightning.Policies.Users, :create_workflow, user, project)
true
-iex> can(Lightning.Policies.Users, :create_project, user, %{})
+iex> can(Lightning.Policies.Users, :create_project, user, %{})
false
diff --git a/Lightning.Projects.html b/Lightning.Projects.html
index 5d7f9703a2..8325e10d09 100644
--- a/Lightning.Projects.html
+++ b/Lightning.Projects.html
@@ -692,8 +692,8 @@ change_project(project, attrs \\ %{})
Examples
-iex> change_project(project)
-%Ecto.Changeset{data: %Project{}}
+iex> change_project(project)
+%Ecto.Changeset{data: %Project{}}
@@ -725,11 +725,11 @@ create_project(attrs \\ %{}, schedule_email
Examples
-iex> create_project(%{field: value})
-{:ok, %Project{}}
+iex> create_project(%{field: value})
+{:ok, %Project{}}
-iex> create_project(%{field: bad_value})
-{:error, %Ecto.Changeset{}}
+iex> create_project(%{field: bad_value})
+{:error, %Ecto.Changeset{}}
@@ -758,11 +758,11 @@ delete_project(project)
Examples
-iex> delete_project(project)
-{:ok, %Project{}}
+iex> delete_project(project)
+{:ok, %Project{}}
-iex> delete_project(project)
-{:error, %Ecto.Changeset{}}
+iex> delete_project(project)
+{:error, %Ecto.Changeset{}}
@@ -917,8 +917,8 @@ export_project(atom, project_id, snapshot_i
Examples
-iex> export_project(:yaml, project_id)
-{:ok, string}
+iex> export_project(:yaml, project_id)
+{:ok, string}
@@ -990,10 +990,10 @@ get_project!(id)
Examples
-iex> get_project!(123)
-%Project{}
+iex> get_project!(123)
+%Project{}
-iex> get_project!(456)
+iex> get_project!(456)
** (Ecto.NoResultsError)
@@ -1088,10 +1088,10 @@ get_project_user!(id)
Examples
-iex> get_project_user!(123)
-%ProjectUser{}
+iex> get_project_user!(123)
+%ProjectUser{}
-iex> get_project_user!(456)
+iex> get_project_user!(456)
** (Ecto.NoResultsError)
@@ -1121,16 +1121,16 @@ get_project_user_role(user, project)
Examples
-iex> get_project_user_role(user, project)
+iex> get_project_user_role(user, project)
:admin
-iex> get_project_user_role(user, project)
+iex> get_project_user_role(user, project)
:viewer
-iex> get_project_user_role(user, project)
+iex> get_project_user_role(user, project)
:editor
-iex> get_project_user_role(user, project)
+iex> get_project_user_role(user, project)
:owner
@@ -1181,10 +1181,10 @@ get_project_with_users!(id)
Examples
-iex> get_project!(123)
-%Project{}
+iex> get_project!(123)
+%Project{}
-iex> get_project!(456)
+iex> get_project!(456)
** (Ecto.NoResultsError)
@@ -1386,8 +1386,8 @@ list_projects()
Examples
-iex> list_projects()
-[%Project{}, ...]
+iex> list_projects()
+[%Project{}, ...]
@@ -1869,11 +1869,11 @@ update_project(project, attrs, user \\ nil)
Examples
-iex> update_project(project, %{field: new_value})
-{:ok, %Project{}}
+iex> update_project(project, %{field: new_value})
+{:ok, %Project{}}
-iex> update_project(project, %{field: bad_value})
-{:error, %Ecto.Changeset{}}
+iex> update_project(project, %{field: bad_value})
+{:error, %Ecto.Changeset{}}
@@ -1901,11 +1901,11 @@ update_project_user(project_user, attrs)
Examples
-iex> update_project_user(project_user, %{field: new_value})
-{:ok, %ProjectUser{}}
+iex> update_project_user(project_user, %{field: new_value})
+{:ok, %ProjectUser{}}
-iex> update_project_user(projectUser, %{field: bad_value})
-{:error, %Ecto.Changeset{}}
+iex> update_project_user(projectUser, %{field: bad_value})
+{:error, %Ecto.Changeset{}}
@@ -1964,8 +1964,8 @@ validate_for_deletion(project, attrs)
Examples
-iex> validate_for_deletion(project)
-%Ecto.Changeset{data: %Project{}}
+iex> validate_for_deletion(project)
+%Ecto.Changeset{data: %Project{}}
diff --git a/Lightning.PromEx.html b/Lightning.PromEx.html
index 3ff59c9ae3..b67c814ea5 100644
--- a/Lightning.PromEx.html
+++ b/Lightning.PromEx.html
@@ -143,24 +143,24 @@
more details regarding configuring PromEx:config :lightning, Lightning.PromEx,
disabled: false,
manual_metrics_start_delay: :no_delay,
- drop_metrics_groups: [],
+ drop_metrics_groups: [],
grafana: :disabled,
metrics_server: :disabled
Add this module to your application supervision tree. It should be one of the first
things that is started so that no Telemetry events are missed. For example, if PromEx
is started after your Repo module, you will miss Ecto's init events and the dashboards
-will be missing some data points:
def start(_type, _args) do
- children = [
+will be missing some data points:def start(_type, _args) do
+ children = [
Lightning.PromEx,
...
- ]
+ ]
...
-end
Update your endpoint.ex
file to expose your metrics (or configure a standalone
+
end
Update your endpoint.ex
file to expose your metrics (or configure a standalone
server using the :metrics_server
config options). Be sure to put this plug before
your Plug.Telemetry
entry so that you can avoid having calls to your /metrics
endpoint create their own metrics and logs which can pollute your logs/metrics given
-that Prometheus will scrape at a regular interval and that can get noisy:
defmodule LightningWeb.Endpoint do
+that Prometheus will scrape at a regular interval and that can get noisy:defmodule LightningWeb.Endpoint do
use Phoenix.Endpoint, otp_app: :lightning
...
@@ -168,7 +168,7 @@
plug PromEx.Plug, prom_ex_module: Lightning.PromEx
...
-end
Update the list of plugins in the plugins/0
function return list to reflect your
+
end
Update the list of plugins in the plugins/0
function return list to reflect your
application's dependencies. Also update the list of dashboards that are to be uploaded
to Grafana in the dashboards/0
function.
diff --git a/Lightning.Repo.html b/Lightning.Repo.html
index b13e4c3d3f..eb43269d7f 100644
--- a/Lightning.Repo.html
+++ b/Lightning.Repo.html
@@ -1740,13 +1740,13 @@ transact(fun, opts \\ [])
A small wrapper around Repo.transaction/2
.
Commits the transaction if the lambda returns :ok
or {:ok, result}
,
rolling it back if the lambda returns :error
or {:error, reason}
. In both
-cases, the function returns the result of the lambda.
Example:
Repo.transact(fn ->
- with {:ok, user} <- Accounts.create_user(params),
- {:ok, _log} <- Logs.log_action(:user_registered, user),
- {:ok, _job} <- Mailer.enqueue_email_confirmation(user) do
- {:ok, user}
- end
-end)
From blog post found here
+cases, the function returns the result of the lambda.Example:
Repo.transact(fn ->
+ with {:ok, user} <- Accounts.create_user(params),
+ {:ok, _log} <- Logs.log_action(:user_registered, user),
+ {:ok, _job} <- Mailer.enqueue_email_confirmation(user) do
+ {:ok, user}
+ end
+end)
From blog post found here
diff --git a/Lightning.Runs.Query.html b/Lightning.Runs.Query.html
index 8caafe51bb..e0de786291 100644
--- a/Lightning.Runs.Query.html
+++ b/Lightning.Runs.Query.html
@@ -243,7 +243,7 @@ eligible_for_claim()
This query does not currently take into account the priority of the run.
To allow for prioritization, the query should be updated to order by
-priority.
eligible_for_claim() |> prepend_order_by([:priority])
+priority.eligible_for_claim() |> prepend_order_by([:priority])
diff --git a/Lightning.Runs.html b/Lightning.Runs.html
index 344db3bcea..0eb80c8cfe 100644
--- a/Lightning.Runs.html
+++ b/Lightning.Runs.html
@@ -479,7 +479,7 @@ get(id, opts \\ [])
-Get a run by id.
Optionally preload associations by passing a list of atoms to :include
.
Lightning.Runs.get(id, include: [:workflow])
+Get a run by id.
Optionally preload associations by passing a list of atoms to :include
.
Lightning.Runs.get(id, include: [:workflow])
diff --git a/Lightning.Runtime.LogAgent.html b/Lightning.Runtime.LogAgent.html
index 3d795d5e2f..5e79232f03 100644
--- a/Lightning.Runtime.LogAgent.html
+++ b/Lightning.Runtime.LogAgent.html
@@ -139,9 +139,9 @@
Agent facility to consume STDOUT/STDERR byte by byte.
Since it works on a byte by byte basis, you will need to perform line-splitting
-yourself.
Usage:
{:ok, log} = LogAgent.start_link()
-"foo" = LogAgent.process_chunk(log, {:stdout, "foo"})
-"foobar" = LogAgent.process_chunk(log, {:stdout, "bar"})
+yourself.Usage:
{:ok, log} = LogAgent.start_link()
+"foo" = LogAgent.process_chunk(log, {:stdout, "foo"})
+"foobar" = LogAgent.process_chunk(log, {:stdout, "bar"})
diff --git a/Lightning.Runtime.RuntimeManager.html b/Lightning.Runtime.RuntimeManager.html
index 29a26f7283..e27ffb0a05 100644
--- a/Lightning.Runtime.RuntimeManager.html
+++ b/Lightning.Runtime.RuntimeManager.html
@@ -147,8 +147,8 @@
Sample:
config :lightining, Elixir.Lightning.Runtime.RuntimeManager,
version: "0.1.0",
start: true,
args: ~w(js/app.js --bundle --target=es2016 --outdir=../priv/static/assets),
-cd: Path.expand("../assets", __DIR__),
-env: %{}
Options:
:version
- the expected runtime version
:start
- flag to start the runtime manager. If false
the GenServer
+
cd: Path.expand("../assets", __DIR__),
+env: %{}
Options:
:version
- the expected runtime version
:start
- flag to start the runtime manager. If false
the GenServer
won't be started
:path
- the path to find the runtime executable at. By
default, it is automatically downloaded and placed inside
the _build
directory of your current app
Overriding the :path
is not recommended, as we will automatically
diff --git a/Lightning.Scrubber.html b/Lightning.Scrubber.html
index cd923e0db9..588fae389c 100644
--- a/Lightning.Scrubber.html
+++ b/Lightning.Scrubber.html
@@ -138,11 +138,11 @@
-Process used to scrub strings of sensitive information.
Can be started via start_link/1
.
{:ok, scrubber} =
- Lightning.Scrubber.start_link(
+Process used to scrub strings of sensitive information.
Can be started via start_link/1
.
{:ok, scrubber} =
+ Lightning.Scrubber.start_link(
samples:
- Lightning.Credentials.sensitive_values_for(credential)
- )
Takes an optional :name
key, in case you need to name the process.
+ Lightning.Credentials.sensitive_values_for(credential)
+ )
Takes an optional :name
key, in case you need to name the process.
diff --git a/Lightning.Storage.GCS.html b/Lightning.Storage.GCS.html
index 40443af927..1e4579d490 100644
--- a/Lightning.Storage.GCS.html
+++ b/Lightning.Storage.GCS.html
@@ -151,10 +151,10 @@
Example Usage
# Store a file in GCS
-Lightning.Storage.GCS.store("/path/to/source", "destination/path")
+Lightning.Storage.GCS.store("/path/to/source", "destination/path")
# Get a signed URL for the stored file
-{:ok, url} = Lightning.Storage.GCS.get_url("destination/path")
+
{:ok, url} = Lightning.Storage.GCS.get_url("destination/path")
diff --git a/Lightning.Storage.Local.html b/Lightning.Storage.Local.html
index 93b0658344..90daba7248 100644
--- a/Lightning.Storage.Local.html
+++ b/Lightning.Storage.Local.html
@@ -157,11 +157,11 @@
Example Usage
# Store a file
-{:ok, filename} =
- Lightning.Storage.Local.store("/path/to/source", "destination/path")
+{:ok, filename} =
+ Lightning.Storage.Local.store("/path/to/source", "destination/path")
# Get the URL for the stored file
-{:ok, url} = Lightning.Storage.Local.get_url("destination/path")
+
{:ok, url} = Lightning.Storage.Local.get_url("destination/path")
diff --git a/Lightning.Storage.ProjectFileDefinition.html b/Lightning.Storage.ProjectFileDefinition.html
index b6cdbc1574..84e8cf373f 100644
--- a/Lightning.Storage.ProjectFileDefinition.html
+++ b/Lightning.Storage.ProjectFileDefinition.html
@@ -139,13 +139,13 @@
This module provides functionality for managing the storage and retrieval of project files.
It handles operations related to storing project files, generating URLs for accessing these files, and constructing storage paths for exported files. It serves as an abstraction layer over the underlying storage mechanism provided by the Lightning.Storage
module.
## Functions
store/2
: Stores a file from a given source path into the storage system based on the file's path.get_url/1
: Retrieves the URL for accessing a stored file.storage_path_for_exports/2
: Constructs a storage path for exported files, defaulting to a .zip
extension.
## Example Usage
# Store a file
- Lightning.Storage.ProjectFileDefinition.store("/path/to/source", project_file)
+ Lightning.Storage.ProjectFileDefinition.store("/path/to/source", project_file)
# Get a URL for the stored file
- url = Lightning.Storage.ProjectFileDefinition.get_url(project_file)
+ url = Lightning.Storage.ProjectFileDefinition.get_url(project_file)
# Get the storage path for an exported file
- path = Lightning.Storage.ProjectFileDefinition.storage_path_for_exports(project_file)
+
path = Lightning.Storage.ProjectFileDefinition.storage_path_for_exports(project_file)
diff --git a/Lightning.TaskWorker.html b/Lightning.TaskWorker.html
index a02f3233f9..44f9f19270 100644
--- a/Lightning.TaskWorker.html
+++ b/Lightning.TaskWorker.html
@@ -141,7 +141,7 @@
A TaskWorker with concurrency limits.
A simple concurrency limiter that wraps Task.Supervisor
, which already does
have the ability to specify max_children
; it throws an error when
that limit is exceeded.
To use it, start it like any other process; ideally in your supervision tree.
...,
- {Lightning.TaskWorker, name: :cli_task_worker, max_tasks: 4}
Options
:max_tasks
Defaults to the number of system schedulers available to the vm.
+ {Lightning.TaskWorker, name: :cli_task_worker, max_tasks: 4}
Options
:max_tasks
Defaults to the number of system schedulers available to the vm.
diff --git a/Lightning.Validators.html b/Lightning.Validators.html
index f3109fa082..323c4a1182 100644
--- a/Lightning.Validators.html
+++ b/Lightning.Validators.html
@@ -235,10 +235,10 @@ validate_exclusive(changeset, fields, messa
Validate that only one of the fields is set at a time.
Example:
changeset
-|> validate_exclusive(
- [:source_job_id, :source_trigger_id],
+|> validate_exclusive(
+ [:source_job_id, :source_trigger_id],
"source_job_id and source_trigger_id are mutually exclusive"
-)
+)
Perform a DELETE request.
See request/1
or request/2
for options definition.
delete("/users")
-delete("/users", query: [scope: "admin"])
-delete(client, "/users")
-delete(client, "/users", query: [scope: "admin"])
-delete(client, "/users", body: %{name: "Jon"})
+Perform a DELETE request.
See request/1
or request/2
for options definition.
delete("/users")
+delete("/users", query: [scope: "admin"])
+delete(client, "/users")
+delete(client, "/users", query: [scope: "admin"])
+delete(client, "/users", body: %{name: "Jon"})
Perform a DELETE request.
See request!/1
or request!/2
for options definition.
delete!("/users")
-delete!("/users", query: [scope: "admin"])
-delete!(client, "/users")
-delete!(client, "/users", query: [scope: "admin"])
-delete!(client, "/users", body: %{name: "Jon"})
+Perform a DELETE request.
See request!/1
or request!/2
for options definition.
delete!("/users")
+delete!("/users", query: [scope: "admin"])
+delete!(client, "/users")
+delete!(client, "/users", query: [scope: "admin"])
+delete!(client, "/users", body: %{name: "Jon"})
Perform a GET request.
See request/1
or request/2
for options definition.
get("/users")
-get("/users", query: [scope: "admin"])
-get(client, "/users")
-get(client, "/users", query: [scope: "admin"])
-get(client, "/users", body: %{name: "Jon"})
+Perform a GET request.
See request/1
or request/2
for options definition.
get("/users")
+get("/users", query: [scope: "admin"])
+get(client, "/users")
+get(client, "/users", query: [scope: "admin"])
+get(client, "/users", body: %{name: "Jon"})
Perform a GET request.
See request!/1
or request!/2
for options definition.
get!("/users")
-get!("/users", query: [scope: "admin"])
-get!(client, "/users")
-get!(client, "/users", query: [scope: "admin"])
-get!(client, "/users", body: %{name: "Jon"})
+Perform a GET request.
See request!/1
or request!/2
for options definition.
get!("/users")
+get!("/users", query: [scope: "admin"])
+get!(client, "/users")
+get!(client, "/users", query: [scope: "admin"])
+get!(client, "/users", body: %{name: "Jon"})
Perform a HEAD request.
See request/1
or request/2
for options definition.
head("/users")
-head("/users", query: [scope: "admin"])
-head(client, "/users")
-head(client, "/users", query: [scope: "admin"])
-head(client, "/users", body: %{name: "Jon"})
+Perform a HEAD request.
See request/1
or request/2
for options definition.
head("/users")
+head("/users", query: [scope: "admin"])
+head(client, "/users")
+head(client, "/users", query: [scope: "admin"])
+head(client, "/users", body: %{name: "Jon"})
Perform a HEAD request.
See request!/1
or request!/2
for options definition.
head!("/users")
-head!("/users", query: [scope: "admin"])
-head!(client, "/users")
-head!(client, "/users", query: [scope: "admin"])
-head!(client, "/users", body: %{name: "Jon"})
+Perform a HEAD request.
See request!/1
or request!/2
for options definition.
head!("/users")
+head!("/users", query: [scope: "admin"])
+head!(client, "/users")
+head!(client, "/users", query: [scope: "admin"])
+head!(client, "/users", body: %{name: "Jon"})
Perform a OPTIONS request.
See request/1
or request/2
for options definition.
options("/users")
-options("/users", query: [scope: "admin"])
-options(client, "/users")
-options(client, "/users", query: [scope: "admin"])
-options(client, "/users", body: %{name: "Jon"})
+Perform a OPTIONS request.
See request/1
or request/2
for options definition.
options("/users")
+options("/users", query: [scope: "admin"])
+options(client, "/users")
+options(client, "/users", query: [scope: "admin"])
+options(client, "/users", body: %{name: "Jon"})
Perform a OPTIONS request.
See request!/1
or request!/2
for options definition.
options!("/users")
-options!("/users", query: [scope: "admin"])
-options!(client, "/users")
-options!(client, "/users", query: [scope: "admin"])
-options!(client, "/users", body: %{name: "Jon"})
+Perform a OPTIONS request.
See request!/1
or request!/2
for options definition.
options!("/users")
+options!("/users", query: [scope: "admin"])
+options!(client, "/users")
+options!(client, "/users", query: [scope: "admin"])
+options!(client, "/users", body: %{name: "Jon"})
Perform a PATCH request.
See request/1
or request/2
for options definition.
patch("/users", %{name: "Jon"})
-patch("/users", %{name: "Jon"}, query: [scope: "admin"])
-patch(client, "/users", %{name: "Jon"})
-patch(client, "/users", %{name: "Jon"}, query: [scope: "admin"])
+Perform a PATCH request.
See request/1
or request/2
for options definition.
patch("/users", %{name: "Jon"})
+patch("/users", %{name: "Jon"}, query: [scope: "admin"])
+patch(client, "/users", %{name: "Jon"})
+patch(client, "/users", %{name: "Jon"}, query: [scope: "admin"])
Perform a PATCH request.
See request!/1
or request!/2
for options definition.
patch!("/users", %{name: "Jon"})
-patch!("/users", %{name: "Jon"}, query: [scope: "admin"])
-patch!(client, "/users", %{name: "Jon"})
-patch!(client, "/users", %{name: "Jon"}, query: [scope: "admin"])
+Perform a PATCH request.
See request!/1
or request!/2
for options definition.
patch!("/users", %{name: "Jon"})
+patch!("/users", %{name: "Jon"}, query: [scope: "admin"])
+patch!(client, "/users", %{name: "Jon"})
+patch!(client, "/users", %{name: "Jon"}, query: [scope: "admin"])
Perform a POST request.
See request/1
or request/2
for options definition.
post("/users", %{name: "Jon"})
-post("/users", %{name: "Jon"}, query: [scope: "admin"])
-post(client, "/users", %{name: "Jon"})
-post(client, "/users", %{name: "Jon"}, query: [scope: "admin"])
+Perform a POST request.
See request/1
or request/2
for options definition.
post("/users", %{name: "Jon"})
+post("/users", %{name: "Jon"}, query: [scope: "admin"])
+post(client, "/users", %{name: "Jon"})
+post(client, "/users", %{name: "Jon"}, query: [scope: "admin"])
Perform a POST request.
See request!/1
or request!/2
for options definition.
post!("/users", %{name: "Jon"})
-post!("/users", %{name: "Jon"}, query: [scope: "admin"])
-post!(client, "/users", %{name: "Jon"})
-post!(client, "/users", %{name: "Jon"}, query: [scope: "admin"])
+Perform a POST request.
See request!/1
or request!/2
for options definition.
post!("/users", %{name: "Jon"})
+post!("/users", %{name: "Jon"}, query: [scope: "admin"])
+post!(client, "/users", %{name: "Jon"})
+post!(client, "/users", %{name: "Jon"}, query: [scope: "admin"])
Perform a PUT request.
See request/1
or request/2
for options definition.
put("/users", %{name: "Jon"})
-put("/users", %{name: "Jon"}, query: [scope: "admin"])
-put(client, "/users", %{name: "Jon"})
-put(client, "/users", %{name: "Jon"}, query: [scope: "admin"])
+Perform a PUT request.
See request/1
or request/2
for options definition.
put("/users", %{name: "Jon"})
+put("/users", %{name: "Jon"}, query: [scope: "admin"])
+put(client, "/users", %{name: "Jon"})
+put(client, "/users", %{name: "Jon"}, query: [scope: "admin"])
Perform a PUT request.
See request!/1
or request!/2
for options definition.
put!("/users", %{name: "Jon"})
-put!("/users", %{name: "Jon"}, query: [scope: "admin"])
-put!(client, "/users", %{name: "Jon"})
-put!(client, "/users", %{name: "Jon"}, query: [scope: "admin"])
+Perform a PUT request.
See request!/1
or request!/2
for options definition.
put!("/users", %{name: "Jon"})
+put!("/users", %{name: "Jon"}, query: [scope: "admin"])
+put!(client, "/users", %{name: "Jon"})
+put!(client, "/users", %{name: "Jon"}, query: [scope: "admin"])
ExampleApi.request(method: :get, url: "/users/path")
+ExampleApi.request(method: :get, url: "/users/path")
# use shortcut methods
-ExampleApi.get("/users/1")
-ExampleApi.post(client, "/users", %{name: "Jon"})
+ExampleApi.get("/users/1")
+ExampleApi.post(client, "/users", %{name: "Jon"})
Perform a TRACE request.
See request/1
or request/2
for options definition.
trace("/users")
-trace("/users", query: [scope: "admin"])
-trace(client, "/users")
-trace(client, "/users", query: [scope: "admin"])
-trace(client, "/users", body: %{name: "Jon"})
+Perform a TRACE request.
See request/1
or request/2
for options definition.
trace("/users")
+trace("/users", query: [scope: "admin"])
+trace(client, "/users")
+trace(client, "/users", query: [scope: "admin"])
+trace(client, "/users", body: %{name: "Jon"})
Perform a TRACE request.
See request!/1
or request!/2
for options definition.
trace!("/users")
-trace!("/users", query: [scope: "admin"])
-trace!(client, "/users")
-trace!(client, "/users", query: [scope: "admin"])
-trace!(client, "/users", body: %{name: "Jon"})
+Perform a TRACE request.
See request!/1
or request!/2
for options definition.
trace!("/users")
+trace!("/users", query: [scope: "admin"])
+trace!(client, "/users")
+trace!(client, "/users", query: [scope: "admin"])
+trace!(client, "/users", body: %{name: "Jon"})
Creating a WebhookAuthMethod
without an associated trigger:
iex> create_auth_method(%{valid_attributes}, actor: %User{})
-{:ok, %WebhookAuthMethod{}}
+Creating a WebhookAuthMethod
without an associated trigger:
iex> create_auth_method(%{valid_attributes}, actor: %User{})
+{:ok, %WebhookAuthMethod{}}
-iex> create_auth_method(%{invalid_attributes}, actor: %User{})
-{:error, %Ecto.Changeset{}}
Creating a WebhookAuthMethod
with an associated trigger:
iex> create_auth_method(%Trigger{}, %{valid_attributes}, actor: %User{})
-{:ok, %WebhookAuthMethod{}}
+iex> create_auth_method(%{invalid_attributes}, actor: %User{})
+{:error, %Ecto.Changeset{}}
Creating a WebhookAuthMethod
with an associated trigger:
iex> create_auth_method(%Trigger{}, %{valid_attributes}, actor: %User{})
+{:ok, %WebhookAuthMethod{}}
-iex> create_auth_method(%Trigger{}, %{invalid_attributes}, actor: %User{})
-{:error, %Ecto.Changeset{}}
+
iex> create_auth_method(%Trigger{}, %{invalid_attributes}, actor: %User{})
+{:error, %Ecto.Changeset{}}
Creating a changeset for an API type auth method:
iex> Lightning.Workflows.create_changeset(%WebhookAuthMethod{auth_type: :api}, %{})
-%WebhookAuthMethod{api_key: some_new_api_key}
Creating a changeset for a non-API type auth method:
iex> Lightning.Workflows.create_changeset(%WebhookAuthMethod{auth_type: :other}, %{})
-%WebhookAuthMethod{}
Creating a changeset for an API type auth method:
iex> Lightning.Workflows.create_changeset(%WebhookAuthMethod{auth_type: :api}, %{})
+%WebhookAuthMethod{api_key: some_new_api_key}
Creating a changeset for a non-API type auth method:
iex> Lightning.Workflows.create_changeset(%WebhookAuthMethod{auth_type: :other}, %{})
+%WebhookAuthMethod{}
Successful deletion:
iex> delete_auth_method(%WebhookAuthMethod{id: "some_id"})
-{:ok, %WebhookAuthMethod{}}
Deletion fails due to the item not existing or other conflict:
iex> delete_auth_method(%WebhookAuthMethod{id: "non_existing_id"})
-{:error, reason}
Successful deletion:
iex> delete_auth_method(%WebhookAuthMethod{id: "some_id"})
+{:ok, %WebhookAuthMethod{}}
Deletion fails due to the item not existing or other conflict:
iex> delete_auth_method(%WebhookAuthMethod{id: "non_existing_id"})
+{:error, reason}
When a matching WebhookAuthMethod
is found:
iex> Lightning.Workflows.find_by_api_key("existing_api_key", %Project{id: "existing_project_id"})
-%WebhookAuthMethod{}
When there is no matching WebhookAuthMethod
:
iex> Lightning.Workflows.find_by_api_key("non_existing_api_key", %Project{id: "existing_project_id"})
+When a matching WebhookAuthMethod
is found:
iex> Lightning.Workflows.find_by_api_key("existing_api_key", %Project{id: "existing_project_id"})
+%WebhookAuthMethod{}
When there is no matching WebhookAuthMethod
:
iex> Lightning.Workflows.find_by_api_key("non_existing_api_key", %Project{id: "existing_project_id"})
nil
When a WebhookAuthMethod
with the given ID exists:
iex> Lightning.Workflows.find_by_id!("existing_id")
-%WebhookAuthMethod{}
When there is no WebhookAuthMethod
with the given ID:
iex> Lightning.Workflows.find_by_id!("non_existing_id")
+When a WebhookAuthMethod
with the given ID exists:
iex> Lightning.Workflows.find_by_id!("existing_id")
+%WebhookAuthMethod{}
When there is no WebhookAuthMethod
with the given ID:
iex> Lightning.Workflows.find_by_id!("non_existing_id")
** (Ecto.NoResultsError)
@@ -654,8 +654,8 @@ find_by_username_and_password(username, pas
Examples
-When a matching WebhookAuthMethod
is found and the password is valid:
iex> Lightning.Workflows.find_by_username_and_password("existing_username", "valid_password", %Project{id: "existing_project_id"})
-%WebhookAuthMethod{}
When the username is found but the password is invalid or no matching record is found:
iex> Lightning.Workflows.find_by_username_and_password("existing_username", "invalid_password", %Project{id: "existing_project_id"})
+When a matching WebhookAuthMethod
is found and the password is valid:
iex> Lightning.Workflows.find_by_username_and_password("existing_username", "valid_password", %Project{id: "existing_project_id"})
+%WebhookAuthMethod{}
When the username is found but the password is invalid or no matching record is found:
iex> Lightning.Workflows.find_by_username_and_password("existing_username", "invalid_password", %Project{id: "existing_project_id"})
nil
@@ -704,9 +704,9 @@ list_for_project(project)
Examples
-When the project exists and has associated auth methods:
iex> list_for_project(%Project{id: "existing_project_id"})
-[%WebhookAuthMethod{}, ...]
When the project does not exist or has no associated auth methods:
iex> list_for_project(%Project{id: "non_existing_project_id"})
-[]
+When the project exists and has associated auth methods:
iex> list_for_project(%Project{id: "existing_project_id"})
+[%WebhookAuthMethod{}, ...]
When the project does not exist or has no associated auth methods:
iex> list_for_project(%Project{id: "non_existing_project_id"})
+[]
@@ -754,9 +754,9 @@ list_for_trigger(trigger)
Examples
-When the Trigger
has associated WebhookAuthMethod
s not scheduled for deletion:
iex> Lightning.Workflows.list_for_trigger(%Trigger{id: "existing_trigger_id"})
-[%WebhookAuthMethod{}, ...]
When the Trigger
has no associated WebhookAuthMethod
s or they are all scheduled for deletion:
iex> Lightning.Workflows.list_for_trigger(%Trigger{id: "trigger_without_methods"})
-[]
+When the Trigger
has associated WebhookAuthMethod
s not scheduled for deletion:
iex> Lightning.Workflows.list_for_trigger(%Trigger{id: "existing_trigger_id"})
+[%WebhookAuthMethod{}, ...]
When the Trigger
has no associated WebhookAuthMethod
s or they are all scheduled for deletion:
iex> Lightning.Workflows.list_for_trigger(%Trigger{id: "trigger_without_methods"})
+[]
@@ -809,10 +809,10 @@ perform(job)
Example
-%Oban.Job{
-args: %{"type" => "purge_deleted"}
-}
-|> MyModule.perform()
+%Oban.Job{
+args: %{"type" => "purge_deleted"}
+}
+|> MyModule.perform()
# => {:ok, %{disassociated_count: 2, deleted_count: 2}}
@@ -866,9 +866,9 @@ schedule_for_deletion(webhook_auth_method,
Examples
-When a webhook auth method is successfully scheduled for deletion:
iex> Lightning.Workflows.schedule_for_deletion(%WebhookAuthMethod{id: some_id})
-{:ok, %WebhookAuthMethod{scheduled_deletion: deletion_date}}
When scheduling for deletion fails due to validation errors:
iex> Lightning.Workflows.schedule_for_deletion(%WebhookAuthMethod{})
-{:error, %Ecto.Changeset{}}
+When a webhook auth method is successfully scheduled for deletion:
iex> Lightning.Workflows.schedule_for_deletion(%WebhookAuthMethod{id: some_id})
+{:ok, %WebhookAuthMethod{scheduled_deletion: deletion_date}}
When scheduling for deletion fails due to validation errors:
iex> Lightning.Workflows.schedule_for_deletion(%WebhookAuthMethod{})
+{:error, %Ecto.Changeset{}}
@@ -918,9 +918,9 @@ update_auth_method(webhook_auth_method, att
Examples
-Successful update:
iex> update_auth_method(webhook_auth_method, %{field: new_value}, actor: %User{})
-{:ok, %WebhookAuthMethod{}}
Update fails due to invalid data:
iex> update_auth_method(webhook_auth_method, %{field: bad_value}, actor: %User{})
-{:error, %Ecto.Changeset{}}
+Successful update:
iex> update_auth_method(webhook_auth_method, %{field: new_value}, actor: %User{})
+{:ok, %WebhookAuthMethod{}}
Update fails due to invalid data:
iex> update_auth_method(webhook_auth_method, %{field: bad_value}, actor: %User{})
+{:error, %Ecto.Changeset{}}
@@ -976,9 +976,9 @@ update_trigger_auth_methods(trigger, auth_m
Examples
-Successful association update:
iex> update_trigger_auth_methods(trigger, [webhook_auth_method], actor: %User{})
-{:ok, %Trigger{}}
Update fails due to an invalid changeset:
iex> update_trigger_auth_methods(trigger, [invalid_webhook_auth_method], actor: %User{})
-{:error, %Ecto.Changeset{}}
+Successful association update:
iex> update_trigger_auth_methods(trigger, [webhook_auth_method], actor: %User{})
+{:ok, %Trigger{}}
Update fails due to an invalid changeset:
iex> update_trigger_auth_methods(trigger, [invalid_webhook_auth_method], actor: %User{})
+{:error, %Ecto.Changeset{}}
diff --git a/Lightning.WorkOrders.ExportWorker.html b/Lightning.WorkOrders.ExportWorker.html
index 93c7c29e85..e282b23ed3 100644
--- a/Lightning.WorkOrders.ExportWorker.html
+++ b/Lightning.WorkOrders.ExportWorker.html
@@ -139,7 +139,7 @@
This module handles the export of work orders for a given project. The export process is performed asynchronously using the Oban background job system.
## Responsibilities
- Enqueueing Export Jobs: The
enqueue_export/2
function creates and enqueues an Oban job for exporting work orders based on the given project and search parameters. - Processing Exports: The
perform/1
function is the main entry point for executing the export job. It retrieves the project, processes work orders, and handles the export process. - Export Logic: The export logic involves querying work orders, extracting relevant entities, processing logs and dataclips asynchronously, and writing the final export data to files.
- Error Handling: The module includes comprehensive error handling and logging to ensure that issues during the export process are recorded and can be diagnosed.
- Zip File Creation: After processing, the exported files are compressed into a zip file for easy download or further use.
## Usage
- To enqueue an export job, call
enqueue_export/2
with the project and search parameters. - The export process is triggered by Oban and runs in the
history_exports
queue, limited to a single attempt per job.
## Example
# Enqueue an export job
- Lightning.WorkOrders.ExportWorker.enqueue_export(project, search_params)
+ Lightning.WorkOrders.ExportWorker.enqueue_export(project, search_params)
# The job will run in the background and log the status of the export process.
This module is designed to handle potentially large datasets efficiently by using streaming, async processing, and error recovery mechanisms.
diff --git a/Lightning.WorkOrders.html b/Lightning.WorkOrders.html
index 12562adbf9..4701831329 100644
--- a/Lightning.WorkOrders.html
+++ b/Lightning.WorkOrders.html
@@ -453,7 +453,7 @@ create_for(target, multi \\ Multi.new(), op
-
Create a new Work Order.
For a webhook
create_for(trigger, workflow: workflow, dataclip: dataclip)
For a user
create_for(job, workflow: workflow, dataclip: dataclip, user: user)
+Create a new Work Order.
For a webhook
create_for(trigger, workflow: workflow, dataclip: dataclip)
For a user
create_for(job, workflow: workflow, dataclip: dataclip, user: user)
@@ -505,7 +505,7 @@ get(id, opts \\ [])
-Get a Work Order by id.
Optionally preload associations by passing a list of atoms to :include
.
Lightning.WorkOrders.get(id, include: [:runs])
+Get a Work Order by id.
Optionally preload associations by passing a list of atoms to :include
.
Lightning.WorkOrders.get(id, include: [:runs])
diff --git a/Lightning.Workflows.Job.html b/Lightning.Workflows.Job.html
index 901fd190e9..c973543f18 100644
--- a/Lightning.Workflows.Job.html
+++ b/Lightning.Workflows.Job.html
@@ -358,17 +358,17 @@ put_workflow(changeset, workflow)
Attaches a workflow to a job, this is useful when you have an unpersisted
Workflow changeset - and want it to be created at the same time as a Job.
Example:
workflow =
- Ecto.Changeset.cast(
- %Lightning.Workflows.Workflow{},
- %{ "project_id" => attrs[:project_id], "id" => Ecto.UUID.generate() },
- [:project_id, :id]
- )
+ Ecto.Changeset.cast(
+ %Lightning.Workflows.Workflow{},
+ %{ "project_id" => attrs[:project_id], "id" => Ecto.UUID.generate() },
+ [:project_id, :id]
+ )
job =
- %Job{}
- |> Ecto.Changeset.change()
- |> Job.put_workflow(workflow)
- |> Job.changeset(attrs)
+
%Job{}
+ |> Ecto.Changeset.change()
+ |> Job.put_workflow(workflow)
+ |> Job.changeset(attrs)
diff --git a/Lightning.Workflows.Presence.html b/Lightning.Workflows.Presence.html
index cdb6608e7a..789339ed4f 100644
--- a/Lightning.Workflows.Presence.html
+++ b/Lightning.Workflows.Presence.html
@@ -354,27 +354,27 @@ build_presences_summary(presences, params)<
Examples
-iex> presences = [
-...> %{user: %{id: 1}, joined_at: ~N[2024-07-03 12:00:00], active_sessions: 1},
-...> %{user: %{id: 2}, joined_at: ~N[2024-07-03 12:05:00], active_sessions: 1},
-...> %{user: %{id: 3}, joined_at: ~N[2024-07-03 12:10:00], active_sessions: 1}
-...> ]
-iex> params = %{
-...> current_user_presence: %{user: %{id: 1}, joined_at: ~N[2024-07-03 12:00:00], active_sessions: 1},
-...> current_user: %{id: 1},
-...> view_only_users_ids: [2]
-...> }
-iex> build_presences_summary(presences, params)
-%{
- presences: [
- %{user: %{id: 1}, joined_at: ~N[2024-07-03 12:00:00], active_sessions: 1},
- %{user: %{id: 2}, joined_at: ~N[2024-07-03 12:05:00], active_sessions: 1},
- %{user: %{id: 3}, joined_at: ~N[2024-07-03 12:10:00], active_sessions: 1}
- ],
- prior_user_presence: %{user: %{id: 3}, joined_at: ~N[2024-07-03 12:10:00], active_sessions: 1},
- current_user_presence: %{user: %{id: 1}, joined_at: ~N[2024-07-03 12:00:00], active_sessions: 1},
+iex> presences = [
+...> %{user: %{id: 1}, joined_at: ~N[2024-07-03 12:00:00], active_sessions: 1},
+...> %{user: %{id: 2}, joined_at: ~N[2024-07-03 12:05:00], active_sessions: 1},
+...> %{user: %{id: 3}, joined_at: ~N[2024-07-03 12:10:00], active_sessions: 1}
+...> ]
+iex> params = %{
+...> current_user_presence: %{user: %{id: 1}, joined_at: ~N[2024-07-03 12:00:00], active_sessions: 1},
+...> current_user: %{id: 1},
+...> view_only_users_ids: [2]
+...> }
+iex> build_presences_summary(presences, params)
+%{
+ presences: [
+ %{user: %{id: 1}, joined_at: ~N[2024-07-03 12:00:00], active_sessions: 1},
+ %{user: %{id: 2}, joined_at: ~N[2024-07-03 12:05:00], active_sessions: 1},
+ %{user: %{id: 3}, joined_at: ~N[2024-07-03 12:10:00], active_sessions: 1}
+ ],
+ prior_user_presence: %{user: %{id: 3}, joined_at: ~N[2024-07-03 12:10:00], active_sessions: 1},
+ current_user_presence: %{user: %{id: 1}, joined_at: ~N[2024-07-03 12:00:00], active_sessions: 1},
has_presence_edit_priority: true
-}
+}
@@ -518,8 +518,8 @@ list_presences(topic)
Examples
-iex> Lightning.Workflows.Presence.list_presences("workflow:canvas")
-[%Lightning.Workflows.Presence{user: %User{id: 1}, ...}, ...]
+iex> Lightning.Workflows.Presence.list_presences("workflow:canvas")
+[%Lightning.Workflows.Presence{user: %User{id: 1}, ...}, ...]
@@ -555,12 +555,12 @@ new_user_presence(user, joined_at, active_s
Examples
-iex> Lightning.Workflows.Presence.new_user_presence(%User{id: 1}, 1625597762000000)
-%Lightning.Workflows.Presence{
- user: %User{id: 1},
+iex> Lightning.Workflows.Presence.new_user_presence(%User{id: 1}, 1625597762000000)
+%Lightning.Workflows.Presence{
+ user: %User{id: 1},
joined_at: 1625597762000000,
active_sessions: 0
-}
+}
@@ -638,7 +638,7 @@ track_user_presence(user, topic, pid)
Examples
-iex> Lightning.Workflows.Presence.track_user_presence(%User{id: 1}, "room:lobby", self())
+iex> Lightning.Workflows.Presence.track_user_presence(%User{id: 1}, "room:lobby", self())
:ok
diff --git a/Lightning.Workflows.html b/Lightning.Workflows.html
index d29037aeb8..2476a9fb75 100644
--- a/Lightning.Workflows.html
+++ b/Lightning.Workflows.html
@@ -446,8 +446,8 @@ change_workflow(workflow, attrs \\ %{})
Examples
-iex> change_workflow(workflow)
-%Ecto.Changeset{data: %Workflow{}}
+iex> change_workflow(workflow)
+%Ecto.Changeset{data: %Workflow{}}
@@ -509,12 +509,12 @@ get_edge_by_trigger(trigger)
Examples
-trigger = %Trigger{id: 1, ...}
-Lightning.Workflows.get_edge_by_trigger(trigger)
+trigger = %Trigger{id: 1, ...}
+Lightning.Workflows.get_edge_by_trigger(trigger)
# => %Edge{source_trigger: %Trigger{}, target_job: %Job{}, ...}
-non_existent_trigger = %Trigger{id: 999, ...}
-Lightning.Workflows.get_edge_by_trigger(non_existent_trigger)
+non_existent_trigger = %Trigger{id: 999, ...}
+Lightning.Workflows.get_edge_by_trigger(non_existent_trigger)
# => nil
@@ -584,10 +584,10 @@ get_trigger_by_webhook(path)
Examples
-Lightning.Workflows.get_trigger_by_webhook("some_path_or_id")
+Lightning.Workflows.get_trigger_by_webhook("some_path_or_id")
# => %Trigger{id: 1, custom_path: "some_path_or_id", ...}
-Lightning.Workflows.get_trigger_by_webhook("non_existent_path_or_id")
+Lightning.Workflows.get_trigger_by_webhook("non_existent_path_or_id")
# => nil
@@ -662,10 +662,10 @@ get_workflow!(id)
Examples
-iex> get_workflow!(123)
-%Workflow{}
+iex> get_workflow!(123)
+%Workflow{}
-iex> get_workflow!(456)
+iex> get_workflow!(456)
** (Ecto.NoResultsError)
@@ -769,8 +769,8 @@ list_workflows()
Examples
-iex> list_workflows()
-[%Workflow{}, ...]
+iex> list_workflows()
+[%Workflow{}, ...]
@@ -800,8 +800,8 @@ mark_for_deletion(workflow, attrs \\ %{})
Examples
-iex> change_request_deletion(workflow)
-%Ecto.Changeset{data: %Workflow{}}
+iex> change_request_deletion(workflow)
+%Ecto.Changeset{data: %Workflow{}}
diff --git a/Lightning.epub b/Lightning.epub
index 19f3668b07..7b14076fea 100644
Binary files a/Lightning.epub and b/Lightning.epub differ
diff --git a/LightningWeb.AccountConfirmationModal.html b/LightningWeb.AccountConfirmationModal.html
index b9e3ba0548..63da17c66a 100644
--- a/LightningWeb.AccountConfirmationModal.html
+++ b/LightningWeb.AccountConfirmationModal.html
@@ -162,9 +162,9 @@
Examples
<.live_component
- module={LightningWeb.AccountConfirmationModal}
+ module={LightningWeb.AccountConfirmationModal}
id="account-confirmation-modal"
- current_user={@current_user}
+ current_user={@current_user}
/>
The component uses assigns to manage its state, including:
:show_modal
- Determines if the modal should be visible.:email_sent
- Indicates if the confirmation email was successfully sent.
diff --git a/LightningWeb.Components.NewInputs.html b/LightningWeb.Components.NewInputs.html
index cd97fc0c94..74273d1461 100644
--- a/LightningWeb.Components.NewInputs.html
+++ b/LightningWeb.Components.NewInputs.html
@@ -439,8 +439,8 @@ input(assigns)
Examples
-<.input field={@form[:email]} type="email" />
-<.input name="my-input" errors={["oh no!"]} />
+<.input field={@form[:email]} type="email" />
+<.input name="my-input" errors={["oh no!"]} />
diff --git a/LightningWeb.Components.Viewers.html b/LightningWeb.Components.Viewers.html
index 6519109c75..17658e6c60 100644
--- a/LightningWeb.Components.Viewers.html
+++ b/LightningWeb.Components.Viewers.html
@@ -267,8 +267,8 @@ log_viewer(assigns)
<Viewers.log_viewer
id="log-viewer-data"
- stream={@log_lines}
- highlight_id={@selected_step_id}
+ stream={@log_lines}
+ highlight_id={@selected_step_id}
/>
diff --git a/LightningWeb.Gettext.html b/LightningWeb.Gettext.html
index 520897ecad..3769fd44f1 100644
--- a/LightningWeb.Gettext.html
+++ b/LightningWeb.Gettext.html
@@ -142,15 +142,15 @@
your module gains a set of macros for translations, for example:import LightningWeb.Gettext
# Simple translation
-gettext("Here is the string to translate")
+gettext("Here is the string to translate")
# Plural translation
-ngettext("Here is the string to translate",
+ngettext("Here is the string to translate",
"Here are the strings to translate",
- 3)
+ 3)
# Domain-based translation
-dgettext("errors", "Here is the error message to translate")
See the Gettext Docs for detailed usage.
+
dgettext("errors", "Here is the error message to translate")
See the Gettext Docs for detailed usage.
diff --git a/LightningWeb.OauthCredentialHelper.html b/LightningWeb.OauthCredentialHelper.html
index a5ed7332a9..64cc804ee6 100644
--- a/LightningWeb.OauthCredentialHelper.html
+++ b/LightningWeb.OauthCredentialHelper.html
@@ -263,10 +263,10 @@ broadcast_forward(subscription_id, mod, opt
Broadcast a message specifically for forwarding a message to a component.
It expects a subscription_id
, the module of the component and opts
being a keyword list containing an :id
key of the specific component.
See: Phoenix.LiveView.send_update/3
for more info.
A corresponding LiveView (that is subscribed) is expected to have a matching
-handle_info/2
that looks like this:
def handle_info({:forward, mod, opts}, socket) do
- send_update(mod, opts)
- {:noreply, socket}
-end
+handle_info/2
that looks like this:def handle_info({:forward, mod, opts}, socket) do
+ send_update(mod, opts)
+ {:noreply, socket}
+end
diff --git a/LightningWeb.Pagination.html b/LightningWeb.Pagination.html
index 0c8aa724c6..1a4ce991fe 100644
--- a/LightningWeb.Pagination.html
+++ b/LightningWeb.Pagination.html
@@ -280,13 +280,13 @@ raw_pagination_links(paginator, options \\
Returns the raw data in order to generate the proper HTML for pagination links. Data
is returned in a {text, page_number}
format where text
is intended to be the text
of the link and page_number
is the page it should go to. Defaults are already supplied
-and they are as follows:
[distance: 5, next: :next, previous: :previous, first: true, last: true, ellipsis: :ellipsis]
distance
must be a positive non-zero integer or an exception is raised. next
and previous
should be
+and they are as follows:
[distance: 5, next: :next, previous: :previous, first: true, last: true, ellipsis: :ellipsis]
distance
must be a positive non-zero integer or an exception is raised. next
and previous
should be
strings but can be anything you want as long as it is truthy, falsey values will remove
them from the output. first
and last
are only booleans, and they just include/remove
-their respective link from output. An example of the data returned:
iex> Scrivener.HTML.raw_pagination_links(%{total_pages: 10, page_number: 5})
-[{"<<", 4}, {1, 1}, {2, 2}, {3, 3}, {4, 4}, {5, 5}, {6, 6}, {7, 7}, {8, 8}, {9, 9}, {10, 10}, {">>", 6}]
-iex> Scrivener.HTML.raw_pagination_links(%{total_pages: 20, page_number: 10}, first: ["←"], last: ["→"])
-[{"<<", 9}, {["←"], 1}, {:ellipsis, {:safe, "…"}}, {5, 5}, {6, 6},{7, 7}, {8, 8}, {9, 9}, {10, 10}, {11, 11}, {12, 12}, {13, 13}, {14, 14},{15, 15}, {:ellipsis, {:safe, "…"}}, {["→"], 20}, {">>", 11}]
Simply loop and pattern match over each item and transform it to your custom HTML.
+their respective link from output. An example of the data returned:iex> Scrivener.HTML.raw_pagination_links(%{total_pages: 10, page_number: 5})
+[{"<<", 4}, {1, 1}, {2, 2}, {3, 3}, {4, 4}, {5, 5}, {6, 6}, {7, 7}, {8, 8}, {9, 9}, {10, 10}, {">>", 6}]
+iex> Scrivener.HTML.raw_pagination_links(%{total_pages: 20, page_number: 10}, first: ["←"], last: ["→"])
+[{"<<", 9}, {["←"], 1}, {:ellipsis, {:safe, "…"}}, {5, 5}, {6, 6},{7, 7}, {8, 8}, {9, 9}, {10, 10}, {11, 11}, {12, 12}, {13, 13}, {14, 14},{15, 15}, {:ellipsis, {:safe, "…"}}, {["→"], 20}, {">>", 11}]
Simply loop and pattern match over each item and transform it to your custom HTML.
diff --git a/LightningWeb.Plugs.Redirect.html b/LightningWeb.Plugs.Redirect.html
index 8b787222b7..a30a3fdb9a 100644
--- a/LightningWeb.Plugs.Redirect.html
+++ b/LightningWeb.Plugs.Redirect.html
@@ -219,10 +219,10 @@ call(conn, action)
Examples
-iex> conn = %Plug.Conn{}
-iex> opts = [to: "/new_path"]
-iex> LightningWeb.Plugs.Redirect.call(conn, opts)
-%Plug.Conn{...}
+iex> conn = %Plug.Conn{}
+iex> opts = [to: "/new_path"]
+iex> LightningWeb.Plugs.Redirect.call(conn, opts)
+%Plug.Conn{...}
@@ -268,8 +268,8 @@ init(opts)
Examples
-iex> LightningWeb.Plugs.Redirect.init(to: "/new_path")
-[to: "/new_path"]
+iex> LightningWeb.Plugs.Redirect.init(to: "/new_path")
+[to: "/new_path"]
diff --git a/LightningWeb.Plugs.WebhookAuth.html b/LightningWeb.Plugs.WebhookAuth.html
index 3a98315296..c05e883f4d 100644
--- a/LightningWeb.Plugs.WebhookAuth.html
+++ b/LightningWeb.Plugs.WebhookAuth.html
@@ -249,11 +249,11 @@ call(conn, action)
Webhook Found and Authenticated
-iex> LightningWeb.Plugs.WebhookAuth.call(conn, [])
-%Plug.Conn{status: 200, ...}
+iex> LightningWeb.Plugs.WebhookAuth.call(conn, [])
+%Plug.Conn{status: 200, ...}
-iex> LightningWeb.Plugs.WebhookAuth.call(conn, [])
-%Plug.Conn{status: 404, ...}
+iex> LightningWeb.Plugs.WebhookAuth.call(conn, [])
+%Plug.Conn{status: 404, ...}
diff --git a/LightningWeb.Telemetry.html b/LightningWeb.Telemetry.html
index ba5c5420a4..6e85023e8a 100644
--- a/LightningWeb.Telemetry.html
+++ b/LightningWeb.Telemetry.html
@@ -303,10 +303,10 @@ with_span(prefix, metadata, func)
Convenience function that wraps :telemetry.span/3
.
Given a function with an arity of zero, it passes the metadata
argument
out with the result of the function.
If you need to control the metadata
, pass in a function with an arity of
one. It will be called with the metadata provided and expects the result and
-the updated metadata to be returned in a tuple.
Example:
with_span([:my, span], %{project_id: 123}, fn -> get_project(456) end)
Or when you want to extend the metadata:
with_span([:my, :span], %{user_id: 123}, fn _metadata ->
- project = get_project(456)
- {project, %{project_id: project.id}}
-end)
+the updated metadata to be returned in a tuple.Example:
with_span([:my, span], %{project_id: 123}, fn -> get_project(456) end)
Or when you want to extend the metadata:
with_span([:my, :span], %{user_id: 123}, fn _metadata ->
+ project = get_project(456)
+ {project, %{project_id: project.id}}
+end)
diff --git a/Mix.Tasks.Lightning.InstallAdaptorIcons.html b/Mix.Tasks.Lightning.InstallAdaptorIcons.html
index 1490152ab4..f88ae23da1 100644
--- a/Mix.Tasks.Lightning.InstallAdaptorIcons.html
+++ b/Mix.Tasks.Lightning.InstallAdaptorIcons.html
@@ -375,11 +375,11 @@ get(client, url, opts)
-
Perform a GET request.
See request/1
or request/2
for options definition.
get("/users")
-get("/users", query: [scope: "admin"])
-get(client, "/users")
-get(client, "/users", query: [scope: "admin"])
-get(client, "/users", body: %{name: "Jon"})
+Perform a GET request.
See request/1
or request/2
for options definition.
get("/users")
+get("/users", query: [scope: "admin"])
+get(client, "/users")
+get(client, "/users", query: [scope: "admin"])
+get(client, "/users", body: %{name: "Jon"})
@@ -408,11 +408,11 @@ get!(client, url, opts)
-Perform a GET request.
See request!/1
or request!/2
for options definition.
get!("/users")
-get!("/users", query: [scope: "admin"])
-get!(client, "/users")
-get!(client, "/users", query: [scope: "admin"])
-get!(client, "/users", body: %{name: "Jon"})
+Perform a GET request.
See request!/1
or request!/2
for options definition.
get!("/users")
+get!("/users", query: [scope: "admin"])
+get!(client, "/users")
+get!(client, "/users", query: [scope: "admin"])
+get!(client, "/users", body: %{name: "Jon"})
@@ -440,11 +440,11 @@ head(client, url, opts)
-Perform a HEAD request.
See request/1
or request/2
for options definition.
head("/users")
-head("/users", query: [scope: "admin"])
-head(client, "/users")
-head(client, "/users", query: [scope: "admin"])
-head(client, "/users", body: %{name: "Jon"})
+Perform a HEAD request.
See request/1
or request/2
for options definition.
head("/users")
+head("/users", query: [scope: "admin"])
+head(client, "/users")
+head(client, "/users", query: [scope: "admin"])
+head(client, "/users", body: %{name: "Jon"})
@@ -473,11 +473,11 @@ head!(client, url, opts)
-Perform a HEAD request.
See request!/1
or request!/2
for options definition.
head!("/users")
-head!("/users", query: [scope: "admin"])
-head!(client, "/users")
-head!(client, "/users", query: [scope: "admin"])
-head!(client, "/users", body: %{name: "Jon"})
+Perform a HEAD request.
See request!/1
or request!/2
for options definition.
head!("/users")
+head!("/users", query: [scope: "admin"])
+head!(client, "/users")
+head!(client, "/users", query: [scope: "admin"])
+head!(client, "/users", body: %{name: "Jon"})
@@ -505,11 +505,11 @@ options(client, url, opts)
-Perform a OPTIONS request.
See request/1
or request/2
for options definition.
options("/users")
-options("/users", query: [scope: "admin"])
-options(client, "/users")
-options(client, "/users", query: [scope: "admin"])
-options(client, "/users", body: %{name: "Jon"})
+Perform a OPTIONS request.
See request/1
or request/2
for options definition.
options("/users")
+options("/users", query: [scope: "admin"])
+options(client, "/users")
+options(client, "/users", query: [scope: "admin"])
+options(client, "/users", body: %{name: "Jon"})
@@ -538,11 +538,11 @@ options!(client, url, opts)
-Perform a OPTIONS request.
See request!/1
or request!/2
for options definition.
options!("/users")
-options!("/users", query: [scope: "admin"])
-options!(client, "/users")
-options!(client, "/users", query: [scope: "admin"])
-options!(client, "/users", body: %{name: "Jon"})
+Perform a OPTIONS request.
See request!/1
or request!/2
for options definition.
options!("/users")
+options!("/users", query: [scope: "admin"])
+options!(client, "/users")
+options!(client, "/users", query: [scope: "admin"])
+options!(client, "/users", body: %{name: "Jon"})
@@ -571,10 +571,10 @@ patch(client, url, body, opts)
-Perform a PATCH request.
See request/1
or request/2
for options definition.
patch("/users", %{name: "Jon"})
-patch("/users", %{name: "Jon"}, query: [scope: "admin"])
-patch(client, "/users", %{name: "Jon"})
-patch(client, "/users", %{name: "Jon"}, query: [scope: "admin"])
+Perform a PATCH request.
See request/1
or request/2
for options definition.
patch("/users", %{name: "Jon"})
+patch("/users", %{name: "Jon"}, query: [scope: "admin"])
+patch(client, "/users", %{name: "Jon"})
+patch(client, "/users", %{name: "Jon"}, query: [scope: "admin"])
@@ -603,10 +603,10 @@ patch!(client, url, body, opts)
-Perform a PATCH request.
See request!/1
or request!/2
for options definition.
patch!("/users", %{name: "Jon"})
-patch!("/users", %{name: "Jon"}, query: [scope: "admin"])
-patch!(client, "/users", %{name: "Jon"})
-patch!(client, "/users", %{name: "Jon"}, query: [scope: "admin"])
+Perform a PATCH request.
See request!/1
or request!/2
for options definition.
patch!("/users", %{name: "Jon"})
+patch!("/users", %{name: "Jon"}, query: [scope: "admin"])
+patch!(client, "/users", %{name: "Jon"})
+patch!(client, "/users", %{name: "Jon"}, query: [scope: "admin"])
@@ -648,11 +648,11 @@ request(client \\ %Tesla.Client{}, options)
Examples
-ExampleApi.request(method: :get, url: "/users/path")
+ExampleApi.request(method: :get, url: "/users/path")
# use shortcut methods
-ExampleApi.get("/users/1")
-ExampleApi.post(client, "/users", %{name: "Jon"})
+ExampleApi.get("/users/1")
+ExampleApi.post(client, "/users", %{name: "Jon"})
@@ -710,11 +710,11 @@ trace(client, url, opts)
-Perform a TRACE request.
See request/1
or request/2
for options definition.
trace("/users")
-trace("/users", query: [scope: "admin"])
-trace(client, "/users")
-trace(client, "/users", query: [scope: "admin"])
-trace(client, "/users", body: %{name: "Jon"})
+Perform a TRACE request.
See request/1
or request/2
for options definition.
trace("/users")
+trace("/users", query: [scope: "admin"])
+trace(client, "/users")
+trace(client, "/users", query: [scope: "admin"])
+trace(client, "/users", body: %{name: "Jon"})
@@ -743,11 +743,11 @@ trace!(client, url, opts)
-Perform a TRACE request.
See request!/1
or request!/2
for options definition.
trace!("/users")
-trace!("/users", query: [scope: "admin"])
-trace!(client, "/users")
-trace!(client, "/users", query: [scope: "admin"])
-trace!(client, "/users", body: %{name: "Jon"})
+Perform a TRACE request.
See request!/1
or request!/2
for options definition.
trace!("/users")
+trace!("/users", query: [scope: "admin"])
+trace!(client, "/users")
+trace!(client, "/users", query: [scope: "admin"])
+trace!(client, "/users", body: %{name: "Jon"})
diff --git a/Mix.Tasks.Lightning.InstallSchemas.html b/Mix.Tasks.Lightning.InstallSchemas.html
index b5552f5af9..db25082ccd 100644
--- a/Mix.Tasks.Lightning.InstallSchemas.html
+++ b/Mix.Tasks.Lightning.InstallSchemas.html
@@ -1830,14 +1830,14 @@ request(request)
Examples
-request = %HTTPoison.Request{
+request = %HTTPoison.Request{
method: :post,
url: "https://my.website.com",
body: "{\"foo\": 3}",
- headers: [{"Accept", "application/json"}]
-}
+ headers: [{"Accept", "application/json"}]
+}
-request(request)
+request(request)
@@ -1895,7 +1895,7 @@ request(method, url, body \\ "",
Examples
-request(:post, "https://my.website.com", "{\"foo\": 3}", [{"Accept", "application/json"}])
+request(:post, "https://my.website.com", "{\"foo\": 3}", [{"Accept", "application/json"}])
diff --git a/benchmarking.md.html b/benchmarking.md.html
index 81f3829f4f..3c39262e87 100644
--- a/benchmarking.md.html
+++ b/benchmarking.md.html
@@ -146,12 +146,12 @@
Start up a local Lightning instance with an attached iex session. Note that
to simulate a production environment, set RTM=false
. In prod, you'll have
your ws-worker
running on a separate machine:
RMT=false iex -S mix phx.server
In the attached iex session, run the following, to have Lightning log
-internal telemetry data:
filepath = Path.join("benchmarking", "load_test_data.csv")
- output_file = File.open!(filepath, [:append])
+internal telemetry data: filepath = Path.join("benchmarking", "load_test_data.csv")
+ output_file = File.open!(filepath, [:append])
c "benchmarking/load_test_production_spans.exs"
- LoadTestingPrep.init(output_file)
Run the demo setup script: mix run --no-start priv/repo/demo.exs
The
+
LoadTestingPrep.init(output_file)
Run the demo setup script: mix run --no-start priv/repo/demo.exs
The
webhookURL
is already set to default to the webhook created in the demo
data
If you would like to point at a different instance or webhook url you
can provide it via WEBHOOK_URL
.
In another terminal (do not stop the Lightning server) run the @@ -163,7 +163,7 @@
k6 run -e PAYLOAD_SIZE_KB=2 benchmarking/script.js
To collect the benchmarking data in a CSV file, run the previous command with
the --out filename
option.
k6 run --out csv=test_results.csv benchmarking/script.js
-
In the iex session, close the output file:
LoadTestingPrep.fin(output_file)
See results output for other +
In the iex session, close the output file:
LoadTestingPrep.fin(output_file)
See results output for other available output formats.
Model Identifier: MacBookPro17,1
Model Number: Z11B000E3LL/A
Chip: Apple M1
-Total Number of Cores: 8 (4 performance and 4 efficiency)
+Total Number of Cores: 8 (4 performance and 4 efficiency)
Memory: 16 GB
k6 run -e PAYLOAD_SIZE=10 benchmarking/script.js Node 18.17.1 k6 0.43.1 07:40:29
/\ |‾‾| /‾‾/ /‾‾/
/\ / \ | |/ / / /
- / \/ \ | ( / ‾‾\
- / \ | |\ \ | (‾) |
+ / \/ \ | ( / ‾‾\
+ / \ | |\ \ | (‾) |
/ __________ \ |__| \__\ \_____/ .io
execution: local
script: benchmarking/script.js
output: -
- scenarios: (100.00%) 1 scenario, 50 max VUs, 2m50s max duration (incl. graceful stop):
- * webhookRequests: Up to 50.00 iterations/s for 2m20s over 3 stages (maxVUs: 50, gracefulStop: 30s)
+ scenarios: (100.00%) 1 scenario, 50 max VUs, 2m50s max duration (incl. graceful stop):
+ * webhookRequests: Up to 50.00 iterations/s for 2m20s over 3 stages (maxVUs: 50, gracefulStop: 30s)
✓ status was 200
@@ -198,24 +198,24 @@ System specs on a 2020 MacBook Pro
checks.........................: 100.00% ✓ 5765 ✗ 0
data_received..................: 1.6 MB 12 kB/s
data_sent......................: 59 MB 421 kB/s
- http_req_blocked...............: avg=16.01µs min=2µs med=9µs max=6.84ms p(90)=12µs p(95)=13µs
- http_req_connecting............: avg=4.35µs min=0s med=0s max=2.22ms p(90)=0s p(95)=0s
- ✓ http_req_duration..............: avg=53.62ms min=26.86ms med=49.03ms max=501.62ms p(90)=66.62ms p(95)=84.33ms
- { expected_response:true }...: avg=53.62ms min=26.86ms med=49.03ms max=501.62ms p(90)=66.62ms p(95)=84.33ms
+ http_req_blocked...............: avg=16.01µs min=2µs med=9µs max=6.84ms p(90)=12µs p(95)=13µs
+ http_req_connecting............: avg=4.35µs min=0s med=0s max=2.22ms p(90)=0s p(95)=0s
+ ✓ http_req_duration..............: avg=53.62ms min=26.86ms med=49.03ms max=501.62ms p(90)=66.62ms p(95)=84.33ms
+ { expected_response:true }...: avg=53.62ms min=26.86ms med=49.03ms max=501.62ms p(90)=66.62ms p(95)=84.33ms
✓ http_req_failed................: 0.00% ✓ 0 ✗ 5765
- http_req_receiving.............: avg=88.57µs min=13µs med=90µs max=2.99ms p(90)=108µs p(95)=124.8µs
- http_req_sending...............: avg=97.47µs min=29µs med=83µs max=6.86ms p(90)=139µs p(95)=162µs
- http_req_tls_handshaking.......: avg=0s min=0s med=0s max=0s p(90)=0s p(95)=0s
- http_req_waiting...............: avg=53.44ms min=26.68ms med=48.84ms max=501.43ms p(90)=66.43ms p(95)=84.05ms
+ http_req_receiving.............: avg=88.57µs min=13µs med=90µs max=2.99ms p(90)=108µs p(95)=124.8µs
+ http_req_sending...............: avg=97.47µs min=29µs med=83µs max=6.86ms p(90)=139µs p(95)=162µs
+ http_req_tls_handshaking.......: avg=0s min=0s med=0s max=0s p(90)=0s p(95)=0s
+ http_req_waiting...............: avg=53.44ms min=26.68ms med=48.84ms max=501.43ms p(90)=66.43ms p(95)=84.05ms
http_reqs......................: 5765 41.15402/s
- iteration_duration.............: avg=54.34ms min=20.75µs med=49.75ms max=502.26ms p(90)=67.39ms p(95)=84.91ms
+ iteration_duration.............: avg=54.34ms min=20.75µs med=49.75ms max=502.26ms p(90)=67.39ms p(95)=84.91ms
iterations.....................: 5765 41.15402/s
vus............................: 50 min=50 max=50
vus_max........................: 50 min=50 max=50
-running (2m20.1s), 00/50 VUs, 5765 complete and 0 interrupted iterations
-webhookRequests ✓ [======================================] 00/50 VUs 2m20s 01.12 iters/s
+
running (2m20.1s), 00/50 VUs, 5765 complete and 0 interrupted iterations
+webhookRequests ✓ [======================================] 00/50 VUs 2m20s 01.12 iters/s
alias Lightning.Repo
-alias Lightning.Workflows.{Workflow, Snapshot}
+alias Lightning.Workflows.{Workflow, Snapshot}
-Repo.transaction(fn ->
+Repo.transaction(fn ->
snapshots =
- Repo.all(Workflow)
- |> Enum.map(&Workflow.touch/1)
- |> Enum.map(&Repo.update!/1)
- |> Enum.map(fn workflow ->
- {:ok, snapshot} = Snapshot.create(workflow)
+ Repo.all(Workflow)
+ |> Enum.map(&Workflow.touch/1)
+ |> Enum.map(&Repo.update!/1)
+ |> Enum.map(fn workflow ->
+ {:ok, snapshot} = Snapshot.create(workflow)
snapshot
- end)
+ end)
- {:ok, snapshots}
-end)
v0.10.0
and the final states are not guaranteed to be
accurate for workflows with multiple branches and leaf nodes with varying exit
reasons.The migration scripts can be run with a single function call in SetupUtils from
-a connect iex
session:
Lightning.SetupUtils.approximate_state_for_attempts_and_workorders()
Note that (like lots of other functionality in SetupUtils
, calling this
+a connect iex
session:
Lightning.SetupUtils.approximate_state_for_attempts_and_workorders()
Note that (like lots of other functionality in SetupUtils
, calling this
function is a destructive action and you should only do it if you've backed up
your data and you know what you're doing.)
As always, we recommend backing up your data before migrating. (And thanks for bearing with us as we move towards our first stable Lightning release.)
<trigger_id>_<message_topic>_<message_partition>_<message_offset>.json
.To recover the persisted messages, it is suggested that the affected triggers be disabled before commencing. Once this is done, the following code needs to -be run from an IEx console on each node that is running Lightning:
Lightning.KafkaTriggers.MessageRecovery.recover_messages(
- Lightning.Config.kafka_alternate_storage_file_path()
-)
Further details regarding the behaviour of MessageRecovery.recover_messages/1
+be run from an IEx console on each node that is running Lightning:
Lightning.KafkaTriggers.MessageRecovery.recover_messages(
+ Lightning.Config.kafka_alternate_storage_file_path()
+)
Further details regarding the behaviour of MessageRecovery.recover_messages/1
can be found in the module documentation of MessageRecovery
. Recovered
messages will have the .json
extension modified to .json.recovered
but they
will be left in place. Future recovery runs will not process files that have
diff --git a/readme.html b/readme.html
index 0ef29f35b4..08f6bf6ffa 100644
--- a/readme.html
+++ b/readme.html
@@ -399,7 +399,7 @@
If you're getting this error on debian
==> earmark_parser
-Compiling 1 file (.yrl)
+Compiling 1 file (.yrl)
/usr/lib/erlang/lib/parsetools-2.3.1/include/yeccpre.hrl: no such file or directory
could not compile dependency :earmark_parser, "mix compile" failed. You can recompile this dependency with "mix deps.compile earmark_parser", update it with "mix deps.update earmark_parser" or clean it with "mix deps.clean earmark_parser"
You need to install erlang development environment sudo apt install erlang-dev
refer to this issue
The build may not work on old versions of Docker and Docker docker compose run --rm web mix ecto.migrate docker compose up -
When running docker compose up
on Apple Silicon (M1, M2, M3), you might encounter the following error:
> [web 20/20] RUN npm install --prefix assets:
+
When running docker compose up
on Apple Silicon (M1, M2, M3), you might encounter the following error:
> [web 20/20] RUN npm install --prefix assets:
0.091 rosetta error: failed to open elf at /lib64/ld-linux-x86-64.so.2
0.091 Trace/breakpoint trap
------
failed to solve: process "/bin/sh -c npm install --prefix assets" did not complete successfully: exit code: 133
You can solve this by setting the default docker platform to linux/amd64
, i.e. DOCKER_DEFAULT_PLATFORM=linux/amd64
.
-You can read more on this here: https://stackoverflow.com/questions/71040681/qemu-x86-64-could-not-open-lib64-ld-linux-x86-64-so-2-no-such-file-or-direc
You might also run into:
[notice] Application ssl exited: exited in: :ssl_app.start(:normal, [])
+You can read more on this here: https://stackoverflow.com/questions/71040681/qemu-x86-64-could-not-open-lib64-ld-linux-x86-64-so-2-no-such-file-or-direcYou might also run into:
[notice] Application ssl exited: exited in: :ssl_app.start(:normal, [])
** (EXIT) an exception was raised:
** (ArgumentError) could not call Module.put_attribute/3 because the module Lightning.MixProject is already compiled
(elixir 1.16.2) lib/module.ex:2360: Module.assert_not_readonly!/2
@@ -451,8 +451,8 @@ Versions
The build may not work on old versions of Docker and Docker
lib/mix/tasks/compile.rambo.ex:89: Mix.Tasks.Compile.Rambo.compile!/0
lib/mix/tasks/compile.rambo.ex:51: Mix.Tasks.Compile.Rambo.run/1
- (mix 1.14.2) lib/mix/task.ex:421: anonymous fn/3 in Mix.Task.run_task/4
- (mix 1.14.2) lib/mix/cli.ex:84: Mix.CLI.run_task/2
You can resolve this error by installing the Rust compiler using Homebrew. Run
+
(mix 1.14.2) lib/mix/task.ex:421: anonymous fn/3 in Mix.Task.run_task/4
+ (mix 1.14.2) lib/mix/cli.ex:84: Mix.CLI.run_task/2
You can resolve this error by installing the Rust compiler using Homebrew. Run
the following command in your terminal: brew install rust
If you have already compiled Rambo explicitly via mix compile.rambo
, and you
are still seeing the following error:
sh: /path_to_directory/Lightning/_build/dev/lib/rambo/priv/rambo: No such file or directory
sh: line 0: exec: /path_to_directory/Lightning/_build/dev/lib/rambo/priv/rambo: cannot execute: No such file or directory
You can try renaming deps/rambo/priv/rambo-mac
to deps/rambo/priv/rambo
.
If neither of the approaches above work, please raise an issue.