Skip to content

Commit

Permalink
add healthcheck to swift bots
Browse files Browse the repository at this point in the history
  • Loading branch information
NourAlharithi committed Oct 23, 2024
1 parent 0073a35 commit 99cf8af
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/experimental-bots/swift/makerExample.ts
Original file line number Diff line number Diff line change
Expand Up @@ -127,6 +127,10 @@ export class SwiftMaker {
this.ws = ws;
}

public async healthCheck() {
return true;
}

private startHeartbeatTimer() {
if (this.heartbeatTimeout) {
clearTimeout(this.heartbeatTimeout);
Expand Down
4 changes: 4 additions & 0 deletions src/experimental-bots/swift/takerExample.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,10 @@ export class SwiftTaker {
await this.startInterval();
}

public async healthCheck() {
return true;
}

async startInterval() {
this.interval = setInterval(async () => {
const slot = await this.driftClient.connection.getSlot();
Expand Down

0 comments on commit 99cf8af

Please sign in to comment.