diff options
4 files changed, 0 insertions, 39 deletions
diff --git a/app/models/concerns/ci/deployable.rb b/app/models/concerns/ci/deployable.rb index 844c8a1fa7d..e8c4f10f1ca 100644 --- a/app/models/concerns/ci/deployable.rb +++ b/app/models/concerns/ci/deployable.rb @@ -18,14 +18,6 @@ module Ci end end - after_transition any => [:failed] do |job| - next unless job.stops_environment? - - job.run_after_commit do - Environments::StopJobFailedWorker.perform_async(id) - end - end - # Synchronize Deployment Status # Please note that the data integrity is not assured because we can't use # a database transaction due to DB decomposition. diff --git a/app/workers/environments/auto_stop_cron_worker.rb b/app/workers/environments/auto_stop_cron_worker.rb index 26b18c406e5..4d6453a85e7 100644 --- a/app/workers/environments/auto_stop_cron_worker.rb +++ b/app/workers/environments/auto_stop_cron_worker.rb @@ -13,7 +13,6 @@ module Environments def perform AutoStopService.new.execute - AutoRecoverService.new.execute end end end diff --git a/spec/support/shared_examples/ci/deployable_shared_examples.rb b/spec/support/shared_examples/ci/deployable_shared_examples.rb index 0781eec1b4b..4f43d38e604 100644 --- a/spec/support/shared_examples/ci/deployable_shared_examples.rb +++ b/spec/support/shared_examples/ci/deployable_shared_examples.rb @@ -166,28 +166,6 @@ RSpec.shared_examples 'a deployable job' do expect(deployment).to be_failed end - - context 'when the job is a stop job' do - before do - job.update!(environment: 'review', options: { environment: { action: 'stop' } }) - end - - it 'enqueues Environments::StopJobFailedWorker' do - expect(Environments::StopJobFailedWorker) - .to receive(:perform_async) - - subject - end - end - - context 'when the job is not a stop job' do - it 'does not enqueue Environments::StopJobFailedWorker' do - expect(Environments::StopJobFailedWorker) - .not_to receive(:perform_async) - - subject - end - end end context 'when transits to skipped' do diff --git a/spec/workers/environments/auto_stop_cron_worker_spec.rb b/spec/workers/environments/auto_stop_cron_worker_spec.rb index 14a74022a1f..ad44cf97e07 100644 --- a/spec/workers/environments/auto_stop_cron_worker_spec.rb +++ b/spec/workers/environments/auto_stop_cron_worker_spec.rb @@ -14,12 +14,4 @@ RSpec.describe Environments::AutoStopCronWorker, feature_category: :continuous_d subject end - - it 'executes Environments::AutoRecoverService' do - expect_next_instance_of(Environments::AutoRecoverService) do |service| - expect(service).to receive(:execute) - end - - subject - end end |