# prefect-community

David Stern

08/03/2020, 12:52 AM
Apologies if this has already been answered, but the docs don't make it super clear what terminology I should use so it's difficult to search for an answer. Basically, I want to know if we can have a flow where it waits for one task to complete, basically because some data isn't yet available from a provider, so it checks that for example every 15 mins and continues the flow when it's available? And importantly, is this available in the open-source version? This is the crucial reason we'd use Prefect instead of exclusively using something like
, which I think we'll use anyway.

Chris White

08/03/2020, 3:55 AM
Hi David - definitely. Here’s what I’d suggest:
Copy code
from datetime import timedelta

@task(max_retries=500, retry_delay=timedelta(minutes=15))
def check_data_available():
    # hit the provider to determine whether
    # data is available
    if data_available:
        return None # can optionally return some info
        raise RuntimeError("Data not yet available.")
👍 3

David Stern

08/04/2020, 7:12 AM
Thanks so much Chris!