(raw: string)
| 133 | } |
| 134 | |
| 135 | private emitTqdmLog(raw: string): void { |
| 136 | if (/INFO/.test(raw)) return |
| 137 | if (!raw.trim()) return |
| 138 | const getWindow = this.getWindow |
| 139 | if (!getWindow) return |
| 140 | const win = getWindow() |
| 141 | const contents = win?.webContents |
| 142 | if (contents && !contents.isDestroyed()) { |
| 143 | contents.send('python:log', raw.trim()) |
| 144 | } |
| 145 | } |
| 146 | |
| 147 | isReady(): boolean { return this.ready } |
| 148 | getPort(): number { return API_PORT } |