https://flyte.org logo
#flytekit
Title
# flytekit
p

Pradithya Aria Pura

03/28/2023, 3:17 AM
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

Ketan (kumare3)

03/28/2023, 4:02 AM
Not today, can be added, but what if it’s a single task execution
Also launchplan maybe better?
p

Pradithya Aria Pura

03/28/2023, 4:50 AM
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

Ketan (kumare3)

03/28/2023, 1:22 PM
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
3 Views