Sha256: 5239bf4a4e8244e60786ecf6be54aad08d702ffcaf5685e6590e2aec8edbbb4e

Contents?: true

Size: 410 Bytes

Versions: 14

Compression:

Stored size: 410 Bytes

Contents

# frozen_string_literal: true

module ShopifyCLI
  class ThreadPool
    class Job
      attr_reader :error

      def perform!
        raise "`#{self.class.name}#perform!` must be defined"
      end

      def call
        perform!
      rescue StandardError => error
        @error = error
      end

      def success?
        !@error
      end

      def error?
        !!@error
      end
    end
  end
end

Version data entries

14 entries across 14 versions & 1 rubygems

Version Path
shopify-cli-2.15.1 lib/shopify_cli/thread_pool/job.rb
shopify-cli-2.15.0 lib/shopify_cli/thread_pool/job.rb
shopify-cli-2.14.0 lib/shopify_cli/thread_pool/job.rb
shopify-cli-2.13.0 lib/shopify_cli/thread_pool/job.rb
shopify-cli-2.12.0 lib/shopify_cli/thread_pool/job.rb
shopify-cli-2.11.2 lib/shopify_cli/thread_pool/job.rb
shopify-cli-2.11.1 lib/shopify_cli/thread_pool/job.rb
shopify-cli-2.11.0 lib/shopify_cli/thread_pool/job.rb
shopify-cli-2.10.2 lib/shopify_cli/thread_pool/job.rb
shopify-cli-2.10.1 lib/shopify_cli/thread_pool/job.rb
shopify-cli-2.10.0 lib/shopify_cli/thread_pool/job.rb
shopify-cli-2.9.0 lib/shopify_cli/thread_pool/job.rb
shopify-cli-2.8.0 lib/shopify_cli/thread_pool/job.rb
shopify-cli-2.7.4 lib/shopify_cli/thread_pool/job.rb