Sha256: 1fe1b2adaadc79214cb3eb4efc122dbdb136e21dd32bee8130a752e1feed2253

Contents?: true

Size: 349 Bytes

Versions: 6

Compression:

Stored size: 349 Bytes

Contents

module RailsExecution
  module Services
    class RemoveScheduledJob

      def initialize(task)
        @task = task
      end

      def call
        return if task.jid.blank?

        task.update(jid: nil) if ::RailsExecution.configuration.scheduled_task_remover.call(task.jid)
      end

      private

      attr_reader :task
    end
  end
end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
rails_execution-0.1.12 lib/rails_execution/services/remove_scheduled_job.rb
rails_execution-0.1.11 lib/rails_execution/services/remove_scheduled_job.rb
rails_execution-0.1.10 lib/rails_execution/services/remove_scheduled_job.rb
rails_execution-0.1.9 lib/rails_execution/services/remove_scheduled_job.rb
rails_execution-0.1.8 lib/rails_execution/services/remove_scheduled_job.rb
rails_execution-0.1.7 lib/rails_execution/services/remove_scheduled_job.rb