lib/command/run_detached.rb in cpl-1.1.2 vs lib/command/run_detached.rb in cpl-1.2.0
- old
+ new
@@ -7,10 +7,11 @@
REQUIRES_ARGS = true
OPTIONS = [
app_option(required: true),
image_option,
workload_option,
+ location_option,
use_local_token_option
].freeze
DESCRIPTION = "Runs one-off **_non-interactive_** replicas (close analog of `heroku run:detached`)"
LONG_DESCRIPTION = <<~DESC
- Runs one-off **_non-interactive_** replicas (close analog of `heroku run:detached`)
@@ -45,10 +46,10 @@
WORKLOAD_SLEEP_CHECK = 2
attr_reader :location, :workload, :one_off, :container
def call # rubocop:disable Metrics/MethodLength
- @location = config[:default_location]
+ @location = config.location
@workload = config.options["workload"] || config[:one_off_workload]
@one_off = "#{workload}-runner-#{rand(1000..9999)}"
step("Cloning workload '#{workload}' on app '#{config.options[:app]}' to '#{one_off}'") do
clone_workload