Skip to content

Commit

Permalink
Use block's source location as timer's log identifier (#149)
Browse files Browse the repository at this point in the history
  • Loading branch information
jimtng authored Sep 18, 2023
1 parent 1f4200e commit efafb19
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion lib/openhab/core/timer.rb
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,8 @@ def initialize(time, id:, thread_locals:, block:)
@id = id
@thread_locals = thread_locals
@block = block
@timer = ScriptExecution.create_timer(1.minute.from_now) { execute }
timer_identifier = block.source_location.join(":")
@timer = ScriptExecution.create_timer(timer_identifier, 1.minute.from_now) { execute }
reschedule!(@time)
end

Expand Down

0 comments on commit efafb19

Please sign in to comment.