You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have been working with factory.ts for quite some time and I am a big. But I recently had the issue where I needed to get multiple instances of a Pipeline. I use result of a pipeline as a representations of DBrecords where some entities have dependencies on others and I needed to create multiple of such, but I could not see that this is supported. So I made a generator function that creates a pipeline in each iteration and returns the result as a workaround.
It would be cool if it was a buildin feature to do something like const pipeline = Factory.Pipeline.Pipeline.start().addFac....; await pipeline.buildList(10) or something similar.
Any thoughts?
The text was updated successfully, but these errors were encountered:
Hey @DaGutsche, sorry for the slow reply. I've just changed jobs, and I'm still waiting on approval to continue to fully own any work I do on this project. For the time being I won't be making changes myself, but I can approve other PRs.
Anyway, I think what you are saying makes sense. I haven't touched the pipelines in a bit, but I was wondering about changing the pipeline (or augmenting it), such that it can return an AsyncFactory at the end, instead of directly awaiting for the results. That would then allow pipelines to conform to the same ultimate generation API as factories. As noted above, I can't implement this just yet, but I'd be happy to approve a PR. If you do take up this change, I am thinking maybe add toFactory() on Pipeline. What do you think? Happy to discuss options here too.
I have been working with factory.ts for quite some time and I am a big. But I recently had the issue where I needed to get multiple instances of a Pipeline. I use result of a pipeline as a representations of DBrecords where some entities have dependencies on others and I needed to create multiple of such, but I could not see that this is supported. So I made a generator function that creates a pipeline in each iteration and returns the result as a workaround.
It would be cool if it was a buildin feature to do something like
const pipeline = Factory.Pipeline.Pipeline.start().addFac....; await pipeline.buildList(10)
or something similar.Any thoughts?
The text was updated successfully, but these errors were encountered: