Luan Tiburcio
05/26/2022, 12:58 PMGood morning, I would like to know if there is a way to return a json directly through the graphql api in prefect1.0-ui??
Sang Young Noh
05/26/2022, 1:53 PMJessica Smith
05/26/2022, 1:55 PMStephen Lloyd
05/26/2022, 2:31 PMsend_tasks
will be a list of the responses and I could iterate over it in a subsequent task, but I’m hoping there is a more efficient method. Can I force a task to fail if the api indicates a failed call? If i do, is there a way to count those?
@task
def make_post(creds, task):
...
response = requests.request('POST', ...)
return response
with Flow(stuff, stuff):
send_tasks = make_post.map(creds=unmapped(creds), task=data)
Will Skelton
05/26/2022, 3:28 PMMatthew Seligson
05/26/2022, 4:11 PMKyle McChesney
05/26/2022, 4:31 PMwith Flow(
'resource_manager',
executor=LocalDaskExecutor(),
) as flow:
with ResourceManager() as manager:
something_res = something(manager)
get_res = another_thing.map(something_res, unmapped(manager))
Mostly wondering If I have the resource manager return “itself” how many copies are made via mapEdmondo Porcu
05/26/2022, 6:35 PMEdmondo Porcu
05/26/2022, 6:37 PMMatthew Seligson
05/26/2022, 6:44 PMRenuka
05/26/2022, 6:53 PMPatrick Tan
05/26/2022, 7:50 PMVarun Srinivasan
05/26/2022, 11:15 PMclass MyFlow(prefect.core.Flow):
def __init__(flow_name, state_handlers, **kwargs):
state_handlers = [log_stdout, on_flow_start, on_flow_finish]
super().__init__(flow_name, state_handlers, **kwargs)
def on_flow_finish(flow: Flow, old_state: State, new_state: State) -> Optional[State]:
if new_state.is_finished() and get_flow_state_name(new_state) == 'Failed':
exception_trace: str = "".join(traceback.format_list(traceback.extract_tb(list(new_state.result.values())[0].result.__traceback__)))
## do something with exception_trace
While running it on prefect cloud, the new_state.result
dict is empty resulting in a IndexError
. When we run it locally, the new_result.result comes back with a length of the number of tasks in the flow. What's the right way to trap exceptions from a task in the flow's scope?Dileep Damodaran
05/27/2022, 5:07 AMJoshua Greenhalgh
05/27/2022, 9:53 AMprefect-job-foo
not sure how I can isolate one flow from another?Volker L
05/27/2022, 11:27 AMTarek
05/27/2022, 11:51 AMNaga Sravika Bodapati
05/27/2022, 12:02 PMThomas Opsomer
05/27/2022, 1:06 PMShriram Holla
05/27/2022, 2:23 PMflow.run()
, it errors out with this message:
TypeError: can't pickle _thread.lock objects
Note: I’m running the flow through a build system (bazel)Jai P
05/27/2022, 3:59 PMWill Skelton
05/27/2022, 4:46 PMIlhom Hayot o'g'li
05/27/2022, 4:53 PMKayvan Shah
05/27/2022, 4:53 PMJuan Valle
05/27/2022, 5:52 PMIlhom Hayot o'g'li
05/27/2022, 6:38 PMAmarpal Singh
05/27/2022, 6:51 PMLin Lin
05/27/2022, 8:00 PMDharit Sura
05/27/2022, 8:06 PMEdmondo Porcu
05/28/2022, 1:52 AMEdmondo Porcu
05/28/2022, 1:52 AMKevin Kho
05/28/2022, 1:53 AM