rufus-scheduler 수정

This commit is contained in:
RubyOn 2025-04-19 06:38:46 +09:00
parent 9ca6e10ac1
commit a958915d41
1 changed files with 2 additions and 2 deletions

View File

@ -5,7 +5,7 @@ module Modbus
class PollingService
class << self
def start
return if @scheduler && @scheduler.jobs.any?
return if @scheduler
puts "[#{Time.current}] Modbus polling service 시작됨 (Rufus)"
@scheduler ||= Rufus::Scheduler.new
@ -30,7 +30,7 @@ module Modbus
end
def running?
@scheduler && @scheduler.jobs.any?
@scheduler
end
private