Sha256: bf93090c3168db3c90b245d27193047f012f818445c6e4be161882378034e937
Contents?: true
Size: 847 Bytes
Versions: 14
Compression:
Stored size: 847 Bytes
Contents
# frozen_string_literal: true require "shopify_cli/thread_pool" require_relative "remote_watcher/json_files_update_job" module ShopifyCLI module Theme class DevServer class RemoteWatcher SYNC_INTERVAL = 3 # seconds class << self def to(theme:, syncer:) new(theme, syncer) end end def start thread_pool.schedule(recurring_job) end def stop thread_pool.shutdown end private def initialize(theme, syncer) @theme = theme @syncer = syncer end def thread_pool @thread_pool ||= ShopifyCLI::ThreadPool.new(pool_size: 1) end def recurring_job JsonFilesUpdateJob.new(@theme, @syncer, SYNC_INTERVAL) end end end end end
Version data entries
14 entries across 14 versions & 1 rubygems