Mix.install([
{:benchee, "~> 1.0.0"},
{:explorer, github: "kimjoaoun/explorer", branch: "joao/from_list"}
])
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
defmodule MyApp.MixProject do | |
use Mix.Project | |
def project do | |
[ | |
app: :my_app, | |
version: "0.1.0", | |
elixir: "~> 1.5", | |
elixirc_paths: elixirc_paths(Mix.env()), | |
compilers: [:phoenix, :gettext] ++ Mix.compilers(), |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
version: "3.3" | |
services: | |
db: | |
image: postgres:11.1-alpine | |
ports: | |
- "5432:5432" | |
app: | |
env_file: .env | |
build: | |
context: . |
I hereby claim:
- I am philss on github.
- I am philipsampaio (https://keybase.io/philipsampaio) on keybase.
- I have a public key ASByGSyTmCs_HKfawo0mQWZRkfWev2PLt3frbOzz6j3DoAo
To claim this, I am signing this object:
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
22:27:17.495 [error] GenServer Oban.Pruner terminating | |
** (Postgrex.Error) ERROR 42P01 (undefined_table) relation "oban_jobs" does not exist | |
query: DELETE FROM "oban_jobs" AS o0 USING (SELECT o0."id" AS "id", o0."state" AS "state", o0."queue" AS "queue", o0."worker" AS "worker", o0."args" AS "args", o0."errors" AS "errors", o0."attempt" AS "attempt", o0."max_attempts" AS "max_attempts", o0."attempted_at" AS "attempted_at", o0."completed_at" AS "completed_at", o0."inserted_at" AS "inserted_at", o0."scheduled_at" AS "scheduled_at" FROM "oban_jobs" AS o0 WHERE (o0."state" IN ('completed','discarded')) ORDER BY o0."id" DESC OFFSET $1) AS s1 WHERE (o0."id" = s1."id") | |
(ecto_sql) lib/ecto/adapters/sql.ex:618: Ecto.Adapters.SQL.raise_sql_call_error/1 | |
(ecto_sql) lib/ecto/adapters/sql.ex:551: Ecto.Adapters.SQL.execute/5 | |
(oban) lib/oban/pruner.ex:44: Oban.Pruner.handle_info/2 | |
(stdlib) gen_server.erl:637: :gen_server.try_dispatch/4 | |
(stdlib) gen_server.erl:388: :gen_server.loop/7 | |
(stdlib) proc_lib.erl:249: :proc_lib.init |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
FROM elixir:1.6.0-alpine | |
RUN mix local.hex --force \ | |
&& mix local.rebar --force \ | |
&& apk --no-cache --update add postgresql-client bash \ | |
&& rm -rf /var/cache/apk/* \ | |
&& mkdir /app | |
COPY . /app | |
WORKDIR /app |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
version: "3.3" | |
services: | |
db: | |
image: postgres | |
ports: | |
- "5432" | |
web: | |
build: | |
context: . | |
dockerfile: Dockerfile |
Every finete state machine that does not need to hold state can be represented by a mutual recursive pair (or more) of functions.
You can implement mutual recursion using the built-in and
keyword between functions.
It is also possible to implement it using a higher order function (a function that receives another function).
NewerOlder