Theom
03/10/2025, 1:39 PM@flow(log_prints=True)
def pipeline():
with transaction(key="download-and-write-data") as txn:
if txn.is_committed():
print("Data file has already been written. Exiting early.")
return
data = download_data()
write_data(data)
I'd like to do something like:
@flow(log_prints=True, persist_result=True)
def pipeline():
with transaction(key="download-data") as txn:
if txn.is_committed():
return txn.result() # Get persisted result somehow
else:
return download_data()
The docs mention the fact that records are written to disk for each transaction, but I don't know what it contains.