diff --git a/examples/halt.rb b/examples/halt.rb index a9b95e76..fa56a181 100755 --- a/examples/halt.rb +++ b/examples/halt.rb @@ -56,7 +56,7 @@ def run end end -if $0 == __FILE__ +if $PROGRAM_NAME == __FILE__ puts example_description ExampleHelper.world.action_logger.level = Logger::DEBUG diff --git a/lib/dynflow/director.rb b/lib/dynflow/director.rb index 915a1491..45b813cb 100644 --- a/lib/dynflow/director.rb +++ b/lib/dynflow/director.rb @@ -335,7 +335,7 @@ def track_execution_plan(execution_plan_id, finished) if @world.coordinator.find_records(filters).any? halt_execution(execution_plan_id) raise Dynflow::Error, - "cannot execute execution_plan_id:#{execution_plan_id} it's execution is inhibited" + "cannot execute execution_plan_id:#{execution_plan_id} it's execution is inhibited" end @execution_plan_managers[execution_plan_id] = diff --git a/lib/dynflow/world.rb b/lib/dynflow/world.rb index 8779cb05..0f3b5f07 100644 --- a/lib/dynflow/world.rb +++ b/lib/dynflow/world.rb @@ -4,6 +4,7 @@ require 'dynflow/world/invalidation' module Dynflow + # rubocop:disable Metrics/ClassLength class World include Algebrick::TypeCheck include Algebrick::Matching @@ -395,4 +396,5 @@ def spawn_and_wait(klass, name, *args) return actor end end + # rubocop:enable Metrics/ClassLength end diff --git a/test/executor_test.rb b/test/executor_test.rb index 0ebc84e8..3ade6400 100644 --- a/test/executor_test.rb +++ b/test/executor_test.rb @@ -768,7 +768,7 @@ def assert_next_steps(expected_next_step_ids, finished_step_id = nil, success = end it 'halts a scheduled execution plan' do - plan = world.delay(Support::DummyExample::Dummy, {start_at: Time.now + 120}) + plan = world.delay(Support::DummyExample::Dummy, { start_at: Time.now + 120 }) wait_for do plan = world.persistence.load_execution_plan(plan.id) plan.state == :scheduled