()
| 596 | } |
| 597 | |
| 598 | dispose(): void { |
| 599 | for (const collection of Object.values(this.config.collections)) { |
| 600 | collection.deferDataRefresh = null |
| 601 | } |
| 602 | |
| 603 | if (this.unsubscribeOnline) { |
| 604 | this.unsubscribeOnline() |
| 605 | this.unsubscribeOnline = null |
| 606 | } |
| 607 | |
| 608 | if (this.unsubscribeLeadership) { |
| 609 | this.unsubscribeLeadership() |
| 610 | this.unsubscribeLeadership = null |
| 611 | } |
| 612 | |
| 613 | if (this.leaderElection) { |
| 614 | this.leaderElection.releaseLeadership() |
| 615 | |
| 616 | if (`dispose` in this.leaderElection) { |
| 617 | ;(this.leaderElection as any).dispose() |
| 618 | } |
| 619 | } |
| 620 | |
| 621 | this.onlineDetector.dispose() |
| 622 | } |
| 623 | } |
| 624 | |
| 625 | export function startOfflineExecutor(config: OfflineConfig): OfflineExecutor { |
nothing calls this directly
no test coverage detected