<commit_before>module ForemanTasks
  module Triggers
    # for test overrides if needed
    attr_writer :foreman_tasks
    def foreman_tasks
      @foreman_tasks ||= ForemanTasks
    end

    def trigger(action, *args, &block)
      foreman_tasks.world.trigger action, *args, &block
    end

    def trigger_task(async, action, *args, &block)
      foreman_tasks.trigger_task(async, action, *args, &block)
    end

    def async_task(action, *args, &block)
      foreman_tasks.async_task(action, *args, &block)
    end

    def sync_task(action, *args, &block)
      foreman_tasks.sync_task(action, *args, &block)
    end
  end
end
<commit_msg>Fix action triggering<commit_after>module ForemanTasks
  module Triggers
    # for test overrides if needed
    attr_writer :foreman_tasks
    def foreman_tasks
      @foreman_tasks ||= ForemanTasks
    end

    def trigger(action, *args, &block)
      foreman_tasks.dynflow.world.trigger action, *args, &block
    end

    def trigger_task(async, action, *args, &block)
      foreman_tasks.trigger_task(async, action, *args, &block)
    end

    def async_task(action, *args, &block)
      foreman_tasks.async_task(action, *args, &block)
    end

    def sync_task(action, *args, &block)
      foreman_tasks.sync_task(action, *args, &block)
    end
  end
end

{'fraction_non_alphanumeric': 0.09585889570552147, 'fraction_numerical': 0.0, 'mean_word_length': 3.4087837837837838, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6586742', 'n_tokens_mistral': 439, 'n_tokens_neox': 431, 'n_words': 108}