@@ -19,18 +19,22 @@ export class RunExecutionSnapshotPoller {
1919 private readonly runFriendlyId : string ;
2020 private snapshotFriendlyId : string ;
2121
22- private readonly snapshotPollIntervalSeconds : number ;
23-
24- private readonly handleSnapshotChange : ( execution : RunExecutionData ) => Promise < void > ;
25-
2622 constructor ( opts : RunExecutionSnapshotPollerOptions ) {
2723 this . logger = opts . logger ;
2824 this . httpClient = opts . httpClient ;
2925
3026 this . runFriendlyId = opts . runFriendlyId ;
3127 this . snapshotFriendlyId = opts . snapshotFriendlyId ;
3228
33- this . handleSnapshotChange = opts . handleSnapshotChange ;
29+ this . logger . sendDebugLog ( {
30+ runId : this . runFriendlyId ,
31+ message : "RunExecutionSnapshotPoller" ,
32+ properties : {
33+ runFriendlyId : this . runFriendlyId ,
34+ snapshotFriendlyId : this . snapshotFriendlyId ,
35+ snapshotPollIntervalSeconds : opts . snapshotPollIntervalSeconds ,
36+ } ,
37+ } ) ;
3438
3539 this . poller = new HeartbeatService ( {
3640 heartbeat : async ( ) => {
@@ -78,9 +82,9 @@ export class RunExecutionSnapshotPoller {
7882 return ;
7983 }
8084
81- await this . handleSnapshotChange ( response . data . execution ) ;
85+ await opts . handleSnapshotChange ( response . data . execution ) ;
8286 } ,
83- intervalMs : this . snapshotPollIntervalSeconds * 1000 ,
87+ intervalMs : opts . snapshotPollIntervalSeconds * 1000 ,
8488 leadingEdge : false ,
8589 onError : async ( error ) => {
8690 this . logger . sendDebugLog ( {
0 commit comments