summaryrefslogtreecommitdiff
path: root/app/workers/environments/auto_stop_cron_worker.rb
blob: de5e10a0976959a18902b28a4f716e9909b3611d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
# frozen_string_literal: true

module Environments
  class AutoStopCronWorker # rubocop:disable Scalability/IdempotentWorker
    include ApplicationWorker
    include CronjobQueue # rubocop:disable Scalability/CronWorkerContext

    feature_category :continuous_delivery

    def perform
      return unless Feature.enabled?(:auto_stop_environments, default_enabled: true)

      AutoStopService.new.execute
    end
  end
end