Sha256: 25e0ef27085f946ecd2bc23e968afdd126154d8bf8fa5c73a07038dcb63143c0

Contents?: true

Size: 816 Bytes

Versions: 14

Compression:

Stored size: 816 Bytes

Contents

# frozen_string_literal: true

require "shopify_cli/thread_pool/job"

module ShopifyCLI
  module Theme
    class DevServer
      class RemoteWatcher
        class JsonFilesUpdateJob < ShopifyCLI::ThreadPool::Job
          def initialize(theme, syncer, interval)
            super(interval)

            @theme = theme
            @syncer = syncer
          end

          def perform!
            @syncer.fetch_checksums!
            @syncer.enqueue_get(json_files)
          end

          private

          def json_files
            @theme
              .json_files
              .reject { |file| @syncer.pending_updates.include?(file) }
              .reject { |file| @syncer.broken_file?(file) }
              .reject { |file| @syncer.ignore_file?(file) }
          end
        end
      end
    end
  end
end

Version data entries

14 entries across 14 versions & 1 rubygems

Version Path
shopify-cli-2.36.0 lib/shopify_cli/theme/dev_server/remote_watcher/json_files_update_job.rb
shopify-cli-2.35.0 lib/shopify_cli/theme/dev_server/remote_watcher/json_files_update_job.rb
shopify-cli-2.34.0 lib/shopify_cli/theme/dev_server/remote_watcher/json_files_update_job.rb
shopify-cli-2.33.1 lib/shopify_cli/theme/dev_server/remote_watcher/json_files_update_job.rb
shopify-cli-2.33.0 lib/shopify_cli/theme/dev_server/remote_watcher/json_files_update_job.rb
shopify-cli-2.32.1 lib/shopify_cli/theme/dev_server/remote_watcher/json_files_update_job.rb
shopify-cli-2.32.0 lib/shopify_cli/theme/dev_server/remote_watcher/json_files_update_job.rb
shopify-cli-2.31.0 lib/shopify_cli/theme/dev_server/remote_watcher/json_files_update_job.rb
shopify-cli-2.30.0 lib/shopify_cli/theme/dev_server/remote_watcher/json_files_update_job.rb
shopify-cli-2.29.0 lib/shopify_cli/theme/dev_server/remote_watcher/json_files_update_job.rb
shopify-cli-2.28.0 lib/shopify_cli/theme/dev_server/remote_watcher/json_files_update_job.rb
shopify-cli-2.27.0 lib/shopify_cli/theme/dev_server/remote_watcher/json_files_update_job.rb
shopify-cli-2.26.0 lib/shopify_cli/theme/dev_server/remote_watcher/json_files_update_job.rb
shopify-cli-2.25.0 lib/shopify_cli/theme/dev_server/remote_watcher/json_files_update_job.rb