Sha256: 59485dd4bef0c4c692c323d476ced9749345cfad1012998c65e6846e3797b5c3
Contents?: true
Size: 848 Bytes
Versions: 17
Compression:
Stored size: 848 Bytes
Contents
# frozen_string_literal: true require "shopify_cli/thread_pool" require_relative "remote_watcher/json_files_update_job" module ShopifyCLI module Theme module 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
17 entries across 17 versions & 1 rubygems