Skip to content

Commit da24a79

Browse files
committed
log when poller is still executing when we stop it
1 parent 8fd09e3 commit da24a79

File tree

2 files changed

+14
-3
lines changed

2 files changed

+14
-3
lines changed

packages/cli-v3/src/entryPoints/managed/poller.ts

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -110,6 +110,11 @@ export class RunExecutionSnapshotPoller {
110110
}
111111

112112
this.enabled = false;
113-
this.poller.stop();
113+
114+
const { isExecuting } = this.poller.stop();
115+
116+
if (isExecuting) {
117+
this.sendDebugLog("stopped poller but it's still executing");
118+
}
114119
}
115120
}

packages/core/src/v3/utils/interval.ts

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,13 +40,19 @@ export class IntervalService {
4040
}
4141
}
4242

43-
stop() {
43+
stop(): { isExecuting: boolean } {
44+
const returnValue = {
45+
isExecuting: this._isExecuting,
46+
};
47+
4448
if (!this._isEnabled) {
45-
return;
49+
return returnValue;
4650
}
4751

4852
this._isEnabled = false;
4953
this.#clearNextInterval();
54+
55+
return returnValue;
5056
}
5157

5258
resetCurrentInterval() {

0 commit comments

Comments
 (0)