Skip to content

Commit e089dc2

Browse files
committed
Rename heartbeats to cron check-ins
See appsignal/appsignal-elixir#957. Emit a deprecation warning both when the `heartbeat` helper is used and when the `Heartbeat` class is initialised, but only once each.
1 parent f730711 commit e089dc2

File tree

7 files changed

+575
-373
lines changed

7 files changed

+575
-373
lines changed
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
---
2+
bump: patch
3+
type: change
4+
---
5+
6+
Rename heartbeats to cron check-ins. Calls to `Appsignal.heartbeat` and `Appsignal.Heartbeat` should be replaced with calls to `Appsignal.CheckIn.cron` and `Appsignal.CheckIn.Cron`, for example:
7+
8+
```js
9+
// Before
10+
import { heartbeat } from "@appsignal/nodejs"
11+
12+
heartbeat("do_something", () => {
13+
do_something()
14+
})
15+
16+
// After
17+
import { CheckIn } from "@appsignal/nodejs"
18+
19+
CheckIn.cron("do_something", () => {
20+
do_something
21+
})
22+
```
23+
24+
Calls to `Appsignal.heartbeat` and to the `Appsignal.Heartbeat` constructor will emit a deprecation warning at compile-time.

0 commit comments

Comments
 (0)