This might be a silly question, but is there a way...
# ask-community
b
This might be a silly question, but is there a way to register the same flow with different parameters? I have 3 very similar flows that need to continually run but their only difference would be a few parameters and I can't see how to do this without rewriting all three flows?
k
Hey, are you putting them on a schedule? Parameters can be attached to clocks.
b
yep, I am
is there an example of that somewhere?
but they will need to be run at the same time, does that matter?
k
Check this and that shouldn’t matter.
m
k
Thanks for bringing that up @Michal Zawadzki! I hadn’t seen that before. I guess you might need 3 separate flows if it doesn’t work @Ben Muller.
m
No problem. We actually have around 50 flows of the same type because of this (they only differ by parameters). You can subclass Flow or write a helper flow builder function (see this comment/discussion) to minimize code duplication.
👍 1
b
Cheers @Michal Zawadzki @Kevin Kho
Looks like it's been implemented though? Right? https://github.com/PrefectHQ/prefect/pull/3394
👏 1
k
I guess so! I remember I gave this advice to someone and they didn’t come back with any complaints so I think it will work.
🚀 1