( marker: string, child: ChildProcessWithoutNullStreams, output: ChildOutput, )
| 733 | } |
| 734 | |
| 735 | const waitForPauseMarker = async ( |
| 736 | marker: string, |
| 737 | child: ChildProcessWithoutNullStreams, |
| 738 | output: ChildOutput, |
| 739 | ): Promise<{ |
| 740 | readonly markerFound: boolean; |
| 741 | readonly exitCode: number | null; |
| 742 | readonly signalCode: NodeJS.Signals | null; |
| 743 | readonly stdout: string; |
| 744 | readonly stderr: string; |
| 745 | }> => { |
| 746 | for (let attempt = 0; attempt < 200; attempt++) { |
| 747 | if (existsSync(marker)) { |
| 748 | return { |
| 749 | markerFound: true, |
| 750 | exitCode: child.exitCode, |
| 751 | signalCode: child.signalCode, |
| 752 | stdout: output.stdout, |
| 753 | stderr: output.stderr, |
| 754 | }; |
| 755 | } |
| 756 | if (child.exitCode !== null || child.signalCode !== null) { |
| 757 | return { |
| 758 | markerFound: false, |
| 759 | exitCode: child.exitCode, |
| 760 | signalCode: child.signalCode, |
| 761 | stdout: output.stdout, |
| 762 | stderr: output.stderr, |
| 763 | }; |
| 764 | } |
| 765 | await new Promise((resolve) => setTimeout(resolve, 25)); |
| 766 | } |
| 767 | return { |
| 768 | markerFound: false, |
| 769 | exitCode: child.exitCode, |
| 770 | signalCode: child.signalCode, |
| 771 | stdout: output.stdout, |
| 772 | stderr: output.stderr, |
| 773 | }; |
| 774 | }; |
| 775 | |
| 776 | const killMigrationAtPause = async (input: { |
| 777 | readonly dbPath: string; |
no outgoing calls
no test coverage detected