ITADN

New HQ outlinks feature hurts modularity

#502Closedvbanos 创建于 2025-09-23
V
vbanoscommented
After discussing this with @CorentinB I note down the following: Zeno v2 has been made in the idea of modularity, and the core of it should be agnostic from "modules" around it. So, some changes do not make sense regarding that design, e.g.: ``` type postprocessor struct { wg sync.WaitGroup ctx context.Context cancel context.CancelFunc inputCh chan *models.Item outputCh chan *models.Item hqOutlinksProduceCh chan *models.Item } ``` This adds an HQ-specific (so, a specific source) thing in the postprocessor struct. There are multiple occurence in this PR of HQ-related stuff outside of the HQ package Same with https://github.com/vbanos/Zeno/blob/ccf5dec7836f20dde5a2bc369a5497ea0bc0f55d/internal/pkg/controler/pipeline.go ``` // Used by optional 2nd HQ instance just to gather outlinks to a different project hqOutlinksFinishChan := makeStageChannel(config.Get().WorkersCount) hqOutlinksProduceChan := makeStageChannel(config.Get().WorkersCount) Instead of HQ stuff being done in the conditional if config.Get().UseHQ { [pipeline.go](https://github.com/vbanos/Zeno/blob/ccf5dec7836f20dde5a2bc369a5497ea0bc0f55d/internal/pkg/controler/pipeline.go) package controler import ( "fmt" "os" ``` ``` outlinks := postprocess(workerID, seed) outlinks = p.sendToHQOutlinks(outlinks) ``` This in postprocessor.go shouldn't exist either, by Zeno v2's design
关闭于 2025-09-29 0 条评论