Created
September 11, 2018 10:28
-
-
Save rafaels88/9a4b66ce28839417996682629eaf09fc to your computer and use it in GitHub Desktop.
Quiqup - Opus, the stages
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 Quiqup.DispatchOrderStagePipeline do | |
use Opus.Pipeline | |
check :validate_order | |
step :persist_stage | |
def validate_order(%{order: order} = pipeline) do | |
# validation code returns true or false | |
end | |
def persist_stage(%{order: order} = pipeline) do | |
# persist code ... | |
end | |
end | |
{:ok, _} = Quiqup.DispatchOrderStagePipeline.call(%{order: order}) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment