Sha256: 352711114b1ee04ae05886aacba0dcb891a6ece2c1cc26adb58662b7eaee80c2
Contents?: true
Size: 1.04 KB
Versions: 8
Compression:
Stored size: 1.04 KB
Contents
class ProconBypassMan::RemoteMacroReceiver # forkしたプロセスで動かすクラス。sock経由で命令を受け取ってmacoのキューに積んでいく def self.start_with_foreground! return unless ProconBypassMan.config.enable_remote_macro? run end def self.start! return unless ProconBypassMan.config.enable_remote_macro? Thread.start do start_with_foreground! end end def self.run while(task = ProconBypassMan::RemoteMacro::QueueOverProcess.pop) receive(task) end shutdown rescue Errno::ENOENT, Errno::ECONNRESET, Errno::ECONNREFUSED => e ProconBypassMan.logger.debug(e) end # @param [ProconBypassMan::RemoteMacro::Task] task def self.receive(task) ProconBypassMan.logger.info "[remote macro][receiver] name: #{task.name}, uuid: #{task.uuid}, steps: #{task.steps}" ProconBypassMan::RemoteMacro::TaskQueueInProcess.push(task) true end def self.shutdown ProconBypassMan.logger.info("ProconBypassMan::RemoteMacroReceiverを終了します。") end end
Version data entries
8 entries across 8 versions & 1 rubygems