Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
async stop() {
betterClearInterval(this.eventLoopInterval);
betterClearInterval(this.memoryInterval);
betterClearInterval(this.cpuInterval);
betterClearInterval(this.clientInterval);
events.removeListener(ACTOR_EVENT_NAMES.SYSTEM_INFO, this._snapshotCpuOnPlatform);
events.removeListener(ACTOR_EVENT_NAMES.SYSTEM_INFO, this._snapshotMemoryOnPlatform);
// Allow microtask queue to unwind before stop returns.
await new Promise(resolve => setImmediate(resolve));
}
async stop() {
betterClearInterval(this.eventLoopInterval);
betterClearInterval(this.memoryInterval);
betterClearInterval(this.cpuInterval);
betterClearInterval(this.clientInterval);
events.removeListener(ACTOR_EVENT_NAMES.SYSTEM_INFO, this._snapshotCpuOnPlatform);
events.removeListener(ACTOR_EVENT_NAMES.SYSTEM_INFO, this._snapshotMemoryOnPlatform);
// Allow microtask queue to unwind before stop returns.
await new Promise(resolve => setImmediate(resolve));
}
async stop() {
betterClearInterval(this.eventLoopInterval);
betterClearInterval(this.memoryInterval);
betterClearInterval(this.cpuInterval);
betterClearInterval(this.clientInterval);
events.removeListener(ACTOR_EVENT_NAMES.SYSTEM_INFO, this._snapshotCpuOnPlatform);
events.removeListener(ACTOR_EVENT_NAMES.SYSTEM_INFO, this._snapshotMemoryOnPlatform);
// Allow microtask queue to unwind before stop returns.
await new Promise(resolve => setImmediate(resolve));
}
async stop() {
betterClearInterval(this.eventLoopInterval);
betterClearInterval(this.memoryInterval);
betterClearInterval(this.cpuInterval);
betterClearInterval(this.clientInterval);
events.removeListener(ACTOR_EVENT_NAMES.SYSTEM_INFO, this._snapshotCpuOnPlatform);
events.removeListener(ACTOR_EVENT_NAMES.SYSTEM_INFO, this._snapshotMemoryOnPlatform);
// Allow microtask queue to unwind before stop returns.
await new Promise(resolve => setImmediate(resolve));
}
async _destroy() {
this.resolve = null;
this.reject = null;
betterClearInterval(this.autoscaleInterval);
betterClearInterval(this.maybeRunInterval);
if (this.snapshotter) await this.snapshotter.stop();
}
}
async _destroy() {
this.resolve = null;
this.reject = null;
betterClearInterval(this.autoscaleInterval);
betterClearInterval(this.maybeRunInterval);
if (this.snapshotter) await this.snapshotter.stop();
}
}