Skip to content

Commit

Permalink
Fix a couple small bugs
Browse files Browse the repository at this point in the history
  • Loading branch information
fractaledmind committed Dec 23, 2024
1 parent 217faa8 commit 56c9106
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions lib/acidic_job/workflow.rb
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ module Workflow

attr_reader :execution, :ctx

def execute_workflow(unique_by:, with: [], &block)
def execute_workflow(unique_by:, with: [Plugins::TransactionalStep], &block)
@plugins = with
serialized_job = serialize

Expand Down Expand Up @@ -172,8 +172,9 @@ def perform_step_for(step_definition)

raise InvalidMethodError.new(step_name) unless step_method.arity.zero?

plugin_pipeline_callable = plugins.reverse.reduce(step_method) do |callable, plugin|
proc { plugin.wrap(step_definition) { callable.call } }
step_kwargs = step_definition.symbolize_keys
plugin_pipeline_callable = @plugins.reverse.reduce(step_method) do |callable, plugin|
proc { plugin.wrap(**step_kwargs) { callable.call } }
end

catch(:repeat) { plugin_pipeline_callable.call }
Expand Down

0 comments on commit 56c9106

Please sign in to comment.