(id: string, inputHash?: string)
| 16 | private inputHashToExecutionId = new Map<string, string>(); |
| 17 | |
| 18 | create(id: string, inputHash?: string): void { |
| 19 | this.executions.set(id, { |
| 20 | id, |
| 21 | messages: [], |
| 22 | completed: false, |
| 23 | subscribers: new Set(), |
| 24 | }); |
| 25 | |
| 26 | // Store input hash mapping if provided |
| 27 | if (inputHash) { |
| 28 | this.inputHashToExecutionId.set(inputHash, id); |
| 29 | } |
| 30 | |
| 31 | // Clean up after 5 minutes |
| 32 | setTimeout(() => { |
| 33 | this.executions.delete(id); |
| 34 | if (inputHash) { |
| 35 | this.inputHashToExecutionId.delete(inputHash); |
| 36 | } |
| 37 | }, 5 * 60 * 1000); |
| 38 | } |
| 39 | |
| 40 | getExecutionIdByInputHash(inputHash: string): string | null { |
| 41 | return this.inputHashToExecutionId.get(inputHash) || null; |
no outgoing calls
no test coverage detected