Is it possible to retrieve workflow name from with...
# flytekit
p
Is it possible to retrieve workflow name from within a task? I am browsing trough
FlyteContext
but can’t see any suitable property available.
k
Not today, can be added, but what if it’s a single task execution
Also launchplan maybe better?
p
Yeah, I think launchplan information is also useful. I have a use-case to calculate the time boundary in a workflow based on current execution time and its schedule. E.g. to determine
start_time
and
end_time
of a query.
end_time
is retrieved based on the
kickoff_time
and
start_time
should be the previous scheduled execution. Currently, I have to pass the cron schedule as workflow input and figure out the previous scheduled execution based on that.
k
IMO you should add a duration/ interval as an argument that you can set
But if the question is how can this be automatic- atm I do not have an idea