Skip to content

Commit

Permalink
Wrap the additional strand fields with the appropriate key
Browse files Browse the repository at this point in the history
  • Loading branch information
enescakir committed Nov 25, 2023
1 parent 6074cb3 commit 52f6429
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions model/strand.rb
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ def load(snap = nil)
def unsynchronized_run
start_time = Time.now
prog_label = "#{prog}.#{label}"
Clog.emit("starting strand") { [self, {time: start_time, prog_label: prog_label}] }
Clog.emit("starting strand") { [self, {strand_started: {delay: start_time - schedule, prog_label: prog_label}}] }

if label == stack.first["deadline_target"].to_s
if (pg = Page.from_tag_parts("Deadline", id, prog, stack.first["deadline_target"]))
Expand Down Expand Up @@ -135,8 +135,7 @@ def unsynchronized_run
fail "BUG: Prog #{prog}##{label} did not provide flow control"
end
ensure
finish_time = Time.now
Clog.emit("finished strand") { [self, {time: finish_time, duration: finish_time - start_time, prog_label: prog_label}] }
Clog.emit("finished strand") { [self, {strand_finished: {duration: Time.now - start_time, prog_label: prog_label}}] }
end

def run(seconds = 0)
Expand Down

0 comments on commit 52f6429

Please sign in to comment.