Skip to content

Commit

Permalink
fix: heartbeats timestamp (#487)
Browse files Browse the repository at this point in the history
Heartbeat reports had older timestamps. Reporting state was cleared
before sleeping for the heartbeat which meant that timestamp was
always off by the heartbeats interval - default 10 minutes.
  • Loading branch information
miki725 authored Feb 12, 2025
1 parent 746992c commit 7251932
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,10 @@
More about syntax directive
[here](https://docs.docker.com/reference/dockerfile/#syntax).
([#486](https://github.com/crashappsec/chalk/pull/486))
- Heartbeat reports had older timestamps. Reporting state was cleared
before sleeping for the heartbeat which meant that timestamp was
always off by the heartbeats interval - default 10 minutes.
([#487](https://github.com/crashappsec/chalk/pull/487))

## 0.5.3

Expand Down
2 changes: 1 addition & 1 deletion src/commands/cmd_exec.nim
Original file line number Diff line number Diff line change
Expand Up @@ -169,8 +169,8 @@ template doHeartbeat(chalkOpt: Option[ChalkObj], pid: Pid, fn: untyped) =

while true:
sleep(sleepInterval)
chalkOpt.doHeartbeatReport()
clearReportingState()
chalkOpt.doHeartbeatReport()
if fn(pid):
break

Expand Down

0 comments on commit 7251932

Please sign in to comment.