()
| 510 | |
| 511 | /** Drain buffered relationships from the store stage and persist them. */ |
| 512 | const drainRelsToStore = async () => { |
| 513 | const rels = storeStage!.drainRelationships(); |
| 514 | if (rels.length === 0) return; |
| 515 | debug.log('store', `draining ${rels.length} rels`); |
| 516 | await this.store.importBatch({ |
| 517 | nodes: [], |
| 518 | relationships: rels.map((r) => ({ |
| 519 | id: r.id, |
| 520 | type: r.type, |
| 521 | source_id: r.source_id, |
| 522 | target_id: r.target_id, |
| 523 | properties: r.properties, |
| 524 | })), |
| 525 | }); |
| 526 | await this.store.flush(); |
| 527 | persistedRels += rels.length; |
| 528 | }; |
| 529 | |
| 530 | for (const event of concurrentPipeline) { |
| 531 | if (cancelled) break; |
nothing calls this directly
no test coverage detected