Skip to content

Commit

Permalink
Merge 2c4e82a into 73a4339
Browse files Browse the repository at this point in the history
  • Loading branch information
NeilMenne committed Sep 14, 2018
2 parents 73a4339 + 2c4e82a commit c5bbc88
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 11 deletions.
5 changes: 2 additions & 3 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
language: elixir
elixir:
- 1.6.0
- 1.7.0
otp_release:
- 20.0
- 21.0

services:
- postgresql
Expand All @@ -15,5 +15,4 @@ script:
- "mix format --check-formatted"
- "mix test"
- "mix credo --strict"
- "travis_wait mix dialyzer --halt-exit-status"
- "mix coveralls.travis"
12 changes: 6 additions & 6 deletions lib/maestro/aggregate/root.ex
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ defmodule Maestro.Aggregate.Root do
Root.persist_snapshot(snap)
end
rescue
err -> {:error, err, System.stacktrace()}
err -> {:error, err, __STACKTRACE__}
end

def call(agg_id, msg) do
Expand Down Expand Up @@ -146,7 +146,7 @@ defmodule Maestro.Aggregate.Root do
{:reply, {:ok, agg.state}, agg}
rescue
err ->
{:reply, {:error, err, System.stacktrace()}, agg}
{:reply, {:error, err, __STACKTRACE__}, agg}
end

def handle_call(:get_current, _from, agg) do
Expand All @@ -156,20 +156,20 @@ defmodule Maestro.Aggregate.Root do
def handle_call({:replay, seq}, _from, agg) do
{:reply, {:ok, Root.replay(agg, seq)}, agg}
rescue
err -> {:reply, {:error, err, System.stacktrace()}, agg}
err -> {:reply, {:error, err, __STACKTRACE__}, agg}
end

def handle_call(:get_snapshot, _from, agg) do
body = prepare_snapshot(agg.state)
{:reply, {:ok, Root.to_snapshot(agg, body)}, agg}
rescue
err -> {:reply, {:error, err, System.stacktrace()}, agg}
err -> {:reply, {:error, err, __STACKTRACE__}, agg}
end

def handle_call({:eval_command, command}, _from, agg) do
{:reply, :ok, Root.eval_command(agg, command)}
rescue
err -> {:reply, {:error, err, System.stacktrace()}, agg}
err -> {:reply, {:error, err, __STACKTRACE__}, agg}
end

def handle_info(:init, agg), do: {:noreply, Root.update_aggregate(agg)}
Expand Down Expand Up @@ -411,7 +411,7 @@ defmodule Maestro.Aggregate.Root do
{:module, module} -> module
end
rescue
_ -> reraise(InvalidHandlerError, [type: type], System.stacktrace())
_ -> reraise(InvalidHandlerError, [type: type], __STACKTRACE__)
end

@doc """
Expand Down
1 change: 1 addition & 0 deletions lib/maestro/types/event.ex
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ defmodule Maestro.Types.Event do
timestamp: HLClock.Timestamp.t(),
aggregate_id: aggregate_id(),
sequence: sequence(),
type: String.t(),
body: map()
}

Expand Down
4 changes: 2 additions & 2 deletions mix.exs
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
defmodule Maestro.Mixfile do
use Mix.Project

@version "0.2.0"
@version "0.2.1"
@source_url "https://github.com/toniqsystems/maestro"

def project do
[
app: :maestro,
version: @version,
elixir: "~> 1.6",
elixir: "~> 1.7",
elixirc_paths: elixirc_paths(Mix.env()),
start_permanent: Mix.env() == :prod,
aliases: aliases(),
Expand Down

0 comments on commit c5bbc88

Please sign in to comment.