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
Quiqup.DispatchOrderStagePipeline.call(%{order: order}, only: [:valid_input?]) | |
Quiqup.DispatchOrderStagePipeline.call(%{order: order}, except: [:push_notification, :emit_event]) |
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 | |
step :persist | |
instrument :stage_completed, %{stage: %{name: :persist}}, fn %{time: time} -> | |
# send to the monitoring tool of your choice | |
end | |
end |
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 PipelineInstrumentation do | |
def instrument(:pipeline_started, %{pipeline: Quiqup.DispatchOrderStagePipeline}, %{input: input}) do | |
# publish the metrics to a specific backend | |
end | |
def instrument(:stage_completed, %{stage: %{pipeline: Quiqup.DispatchOrderStagePipeline}}, %{time: time}) do | |
# publish the metrics to a specific backend | |
end | |
end |
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
Quiqup.DispatchOrderStagePipeline.call(%{order: order}) |
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, raise: true | |
# ... | |
end |
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, instrument?: false | |
# ... | |
end |
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 | |
# ... | |
skip if: :job_is_finished? | |
# ... | |
@spec job_is_finished?(map()) :: bool() | |
end |
OlderNewer