Skip to content

Commit ae2c555

Browse files
committed
heartbeat on start
1 parent c3b32a4 commit ae2c555

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

src/watch.ts

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,17 @@ import { efpAccountMetadataAbi, efpListMinterAbi, efpListRecordsAbi, efpListRegi
1010
import type { EvmClient } from './clients/viem/index'
1111

1212
export async function watchAllEfpContractEvents({ client }: { client: EvmClient }) {
13+
14+
if (env.HEARTBEAT_URL && env.HEARTBEAT_URL !== 'unset') {
15+
try {
16+
const response = await fetch(`${env.HEARTBEAT_URL}`)
17+
const text = await response.text()
18+
logger.info(`Heartbeat registered`)
19+
} catch (err) {
20+
logger.info(`Failed to register heartbeat `)
21+
}
22+
}
23+
1324
try {
1425
const chainId: bigint = BigInt(await client.getChainId())
1526

0 commit comments

Comments
 (0)