Michiel Verburg
05/19/2022, 9:46 AMSander
05/19/2022, 10:00 AMBinoy Shah
05/19/2022, 1:22 PMJordan Parker
05/19/2022, 11:08 PMJan Domanski
05/22/2022, 5:39 PMJacob Blanco
05/23/2022, 7:53 AMjedi
05/23/2022, 8:24 PMJeffrey Lam
05/24/2022, 4:34 PMJacob Blanco
05/25/2022, 2:29 AMParwez Noori
05/26/2022, 3:39 PMSlackbot
05/26/2022, 11:04 PMAaron Goebel
05/26/2022, 11:11 PMDomenico Di Gangi
05/29/2022, 10:48 AMMarcin Grzybowski
05/30/2022, 10:02 AMtaskB.run()
but then it's treated as a normal python function (so no logging, and no other prefect's magic is available for this taskB)
I managed to workaround this creating a Flow in a Task, something like this:
@task
def taskA(config: dict):
#...
with Flow() as flowB:
taskB()
#...
a = flow.runB()
it seems to work - i get logs for flowB and taskB, etc
I can visualize both flows using flow.visualize() - on two separate diagrams - but it's all right for me.
But is this a correct approach, or should I do this some other way?Shriram Holla
05/30/2022, 2:11 PMMarcin Grzybowski
05/31/2022, 6:12 AMAndreas Nord
05/31/2022, 1:33 PMMarcin Grzybowski
05/31/2022, 1:41 PMMarcin Grzybowski
05/31/2022, 3:56 PMRuntimeError("The task runner is already started!")
Modified code below:
import asyncio
from prefect import flow
@flow
async def subflow_1():
print("Subflow 1 started!")
await asyncio.sleep(1)
@flow
async def main_flow():
parallel_subflows = [subflow_1(), subflow_1()]
await asyncio.gather(*parallel_subflows)
if __name__ == "__main__":
main_flow_state = asyncio.run(main_flow())
Jacob Bedard
06/01/2022, 2:21 AMyair friedman
06/02/2022, 6:15 AMtask_id = prefect.context.get("task_id", "")
i have the same task_id for every task A run …..Linh Nguyen
06/02/2022, 9:00 AMMarco Pérez
06/02/2022, 12:23 PMSiôn
06/07/2022, 12:03 PMpython: (flow built with '3.10.4', currently running with '3.7.13')")
But there doesnt seem to be any docs on how to set this python version in the agent deployment cliMax Jackson
06/07/2022, 8:51 PM@task(key=value)
within a structure like
class MyNewTask(Task):
def run():
pass
where would I pass those key/value pairs when initializing the new capital-T Task?Anat Tal Gagnon
06/08/2022, 12:59 PMDavid Arias
06/09/2022, 1:05 AMAaron Goebel
06/10/2022, 8:13 PMJonny
06/12/2022, 12:39 PMAlan Snyder
06/13/2022, 1:30 PMAlan Snyder
06/13/2022, 1:30 PMAnna Geller
06/13/2022, 1:33 PMAlan Snyder
06/13/2022, 1:35 PMAnna Geller
06/13/2022, 1:44 PMAlan Snyder
06/13/2022, 1:49 PM