Skip to content

Commit

Permalink
add stateless lifespan (#80)
Browse files Browse the repository at this point in the history
feat: added OnePiece.Commanded.Aggregate.StatelessLifespan module
  • Loading branch information
yordis committed Apr 28, 2023
1 parent 1e87b58 commit 6b86a59
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 1 deletion.
4 changes: 4 additions & 0 deletions apps/one_piece_commanded/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@

## Unreleased

## v0.17.0 - 2023-04-28

- Added `OnePiece.Commanded.Aggregate.StatelessLifespan` module.

## v0.16.0 - 2023-04-11

- Added `OnePiece.Commanded.EventStore.JsonbSerializer` module.
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
defmodule OnePiece.Commanded.Aggregate.StatelessLifespan do
@moduledoc """
Stops the aggregate after a command, event or error.
"""

@behaviour Commanded.Aggregates.AggregateLifespan

def after_command(_command), do: :stop
def after_event(_event), do: :stop
def after_error(_error), do: :stop
end
2 changes: 1 addition & 1 deletion apps/one_piece_commanded/mix.exs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ defmodule OnePiece.Commanded.MixProject do
use Mix.Project

@app :one_piece_commanded
@version "0.16.0"
@version "0.17.0"
@elixir_version "~> 1.13"
@source_url "https://github.com/straw-hat-team/beam-monorepo"

Expand Down

0 comments on commit 6b86a59

Please sign in to comment.