File tree Expand file tree Collapse file tree 1 file changed +6
-6
lines changed
Expand file tree Collapse file tree 1 file changed +6
-6
lines changed Original file line number Diff line number Diff line change @@ -3,7 +3,7 @@ import { Logger } from '@map-colonies/js-logger';
33import { httpClientConfig } from './models/utils' ;
44
55export class HeartbeatClient extends HttpClient {
6- public intervalKey : number | null = null ;
6+ public intervalKey : NodeJS . Timer | null = null ;
77 public constructor (
88 protected readonly logger : Logger ,
99 protected intervalMs : number ,
@@ -27,11 +27,11 @@ export class HeartbeatClient extends HttpClient {
2727 this . intervalKey = null ;
2828 }
2929 this . intervalKey = setInterval (
30- ( ) => {
31- void this . send ;
30+ // eslint-disable-next-line @typescript-eslint/no-misused-promises
31+ async ( ) => {
32+ await this . send ( taskId ) ;
3233 } ,
33- this . intervalMs ,
34- taskId
34+ this . intervalMs
3535 ) ;
3636 }
3737
@@ -48,7 +48,7 @@ export class HeartbeatClient extends HttpClient {
4848 }
4949 }
5050
51- public async send ( taskId : number ) : Promise < void > {
51+ public async send ( taskId : string ) : Promise < void > {
5252 try {
5353 const heartbeatUrl = `/heartbeat/${ taskId } ` ;
5454 await this . post ( heartbeatUrl ) ;
You can’t perform that action at this time.
0 commit comments