Q07/12/2023, 3:52 PM
I make via
are ignored, i.e. whatever's set in the
decorator call is always used. Looking at the
I get the feeling that all the flow parameters (e.g.
) are not saved to db, only the
is. And the
doesn't get changed by
since it's determined by the name of the underlying (non-Prefect) function, which stays the same. And so this entrypoint gets called when deployment is run, using whatever's set in the
decorator. Am I missing something here?
@flow def flow1(): urstuffhere() flow2=flow1.with_options(.....)
it should work
Q07/12/2023, 4:39 PM
and, therefore, the entrypoint don't change), so you'd have to do something like
But that doesn't work 'cause
@flow def flow1(): urstuffhere() flow2=flow1.with_options(.....) flow2.fn.__name__ = "flow2"
points to the same object for
, so you'd try
import copy; ...; flow2.fn = copy.deepcopy(flow1.fn)
doesn't copy functions so you'd have to do this. Ugh.
class constructor the variable name has to match, so you can't do
def func(): pass flow1 = Flow(func, **config1) flow2 = Flow(func, **config2)
Deceivious07/12/2023, 4:53 PM
Q07/12/2023, 4:55 PM
Deceivious07/12/2023, 4:55 PM
@flow def sub(): urstuffhere() @flow def main(storage_id): sub.with_options(storage=use_storage(storage_id))() #deploy main twice with 2 different parameters?