Samuel Hinton
03/13/2023, 1:17 AMtry:
data = task.submit(start, end, logger=logger)
except DataWarning as e:
logger.warning(e)
send_incoming_webhook_message(
slack_webhook,
f"Warning raised for {task_name} for {start} to {end} due to {e}",
)
But no dice, doesnt play well with the future object. Im reworking all of this to not use exceptions and just pass dictionaries around, but thought knowing the best practise might be usefulTim Galvin
03/13/2023, 1:36 AM.submit
. Just call task
so it runs synchronously. This will cause the remainder to the flow to block until that task
function has been evaluated.Samuel Hinton
03/13/2023, 1:36 AMTim Galvin
03/13/2023, 1:45 AM.result()
attribute of the prefect futures objectSamuel Hinton
03/13/2023, 1:46 AMTim Galvin
03/13/2023, 1:46 AMSamuel Hinton
03/13/2023, 4:39 AMTim Galvin
03/24/2023, 5:33 PMwith_option
. Is there something from this method you need for your tests? I feel like I am missing the point of your question. If the intent is to test your codes with some unit test framework, I would have though separating the funcion from the prefect task / flow annotations would be the ideal path
But I say this having missed the intent of your questionSamuel Hinton
03/26/2023, 11:15 PM