2

I'm trying to use something similar to the code that's used for the kiba cli programmatically as ...

    filename = './path/to/script.rb'
    script_content = IO.read(filename)
    job_definition = Kiba.parse(script_content, filename)
    Kiba.run(job_definition) # <= I want to pass additional parameters here 

I'd like to be able to pass parameters to via the .run command besides the job_definition. It doesn't look like the run supports this but figured I'd check.

slabounty
  • 704
  • 11
  • 21
  • Hello there - it's not yet possible, but I've created [this issue](https://github.com/thbar/kiba/issues/18) you may want to subscribe to, and mentioned potential work-arounds. Let me know if this is good enough for now, I'll definitely add this in the near future! – Thibaut Barrère Jul 10 '15 at 06:44
  • Thanks ... I'll give that a shot. I like the idea of being able to pass parameters to either the run or the parse even though I'll probably be using run in this case. – slabounty Jul 10 '15 at 15:21
  • I tried using ... ```gem 'kiba', :git => 'git://github.com/thbar/kiba.git', :ref => '97758'``` in my bundle and get errors. ```Fetching git://github.com/thbar/kiba.git fatal: ambiguous argument '97758': unknown revision or path not in the working tree. Use '--' to separate paths from revisions, like this: 'git [...] -- [...]'``` Any thoughts? – slabounty Jul 10 '15 at 16:07
  • I *think* that this is because the commit you are referencing is not on my repository, but on the fork by bcherrington. Try referencing `bcherrington/kiba` instead! – Thibaut Barrère Jul 15 '15 at 14:38
  • Yep ... you are absolutely right. Thanks for the help. – slabounty Jul 16 '15 at 16:07
  • A fully supported solution is now described here https://github.com/thbar/kiba/wiki/Considerations-for-running-Kiba-jobs-programmatically-(from-Sidekiq,-Faktory,-Rake,-...) – Thibaut Barrère Jan 06 '18 at 19:34

0 Answers0