Sha256: c9d718b9735099097d99fe5b08766fff314f519079141f34d671a3aa93b131c1

Contents?: true

Size: 794 Bytes

Versions: 1

Compression:

Stored size: 794 Bytes

Contents

module Tennis
  module Backend
    class Abstract

      attr_reader :logger

      def initialize(logger:)
        @logger = logger
      end

      # :nocov:

      # Creates and enqueues a Task.
      def enqueue(job:, method:, args:, delay: nil)
        raise NotImplementedError
      end

      # Returns a Task that have previously been queued. The Task should
      # contain a Job that is an instance of one of the given classes.
      def receive(job_classes:, timeout: 1.0)
        raise NotImplementedError
      end

      # Acknowledge that a Task has been done.
      def ack(task)
        raise NotImplementedError
      end

      # Requeue a Task that haven't been acked.
      def requeue(task)
        raise NotImplementedError
      end

      # :nocov:

    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
tennis-jobs-0.4.0 lib/tennis/backend/abstract.rb