Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix doc code snippets #65

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions lib/flame.ex
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ defmodule FLAME do
features, entire function closures, including any state they close over, can be sent
and executed on a remote node:

def resize_video_quality(%Video{} = video) do
def resize_video_quality(%Video{} = vid) do
FLAME.call(MyApp.FFMpegRunner, fn ->
path = "#{vid.id}_720p.mp4"
System.cmd("ffmpeg", ~w(-i #{vid.url} -s 720x480 -c:a copy #{path}))
Expand Down Expand Up @@ -60,7 +60,7 @@ defmodule FLAME do
children = [
...,
{FLAME.Pool,
name: App.FFMpegRunner,
name: MyApp.FFMpegRunner,
min: 0,
max: 10,
max_concurrency: 5,
Expand All @@ -75,7 +75,7 @@ defmodule FLAME do

Calling a pool is as simple as passing its name to the FLAME functions:

FLAME.call(App.FFMpegRunner, fn -> :operation1 end)
FLAME.call(MyApp.FFMpegRunner, fn -> :operation1 end)

You'll also often want to enable or disable other application services based on whether
your application is being started as child FLAME runner or being run directly.
Expand Down