Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

@thbar
Copy link
Owner

@thbar thbar commented Oct 19, 2020

The usual way to create a Kiba job these days is:

module ETL
  module MyJob
    module_function

    def setup(config)
      Kiba.parse do
        # SNIP (job definition)
      end
    end
  end
end

Then one would invoke it with:

Kiba.run(ETL::MyJob.setup(config))

On occasions, though (e.g. one-off scripts, or during initial prototyping) it can be useful to avoid that and just work inline:

Kiba.run(Kiba.parse do
  # SNIP (job definition)
end)

This PR introduces a shortcut for this type of work, where you can just run the job with:

Kiba.run do
  # SNIP (job definition)
end

@thbar thbar changed the title Support block as parameter for Kiba.Run calls Support block as parameter for "Kiba.run" calls Oct 19, 2020
@thbar thbar merged commit 79e5078 into master Oct 19, 2020
@thbar thbar deleted the kiba-run-block branch October 19, 2020 10:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants