class HerokuOneOff::Runner
Constants
- BASE_URL
Attributes
command[R]
dyno_size[R]
time_to_live[R]
Public Class Methods
new( command, dyno_size: HerokuOneOff::Config.default_dyno_size, time_to_live: HerokuOneOff::Config.default_time_to_live )
click to toggle source
# File lib/heroku-one-off/runner.rb, line 7 def initialize( command, dyno_size: HerokuOneOff::Config.default_dyno_size, time_to_live: HerokuOneOff::Config.default_time_to_live ) @command = command @dyno_size = dyno_size @time_to_live = time_to_live end
Public Instance Methods
app_name()
click to toggle source
# File lib/heroku-one-off/runner.rb, line 21 def app_name @app_name ||= HerokuOneOff::Config.app_name_template.call end
body()
click to toggle source
# File lib/heroku-one-off/runner.rb, line 29 def body { attach: false, command: command, size: dyno_size, time_to_live: time_to_live } end
call()
click to toggle source
# File lib/heroku-one-off/runner.rb, line 17 def call HerokuOneOff::HTTP.new(url, body).post end
url()
click to toggle source
# File lib/heroku-one-off/runner.rb, line 25 def url "#{BASE_URL}/apps/#{app_name}/dynos" end