Emil Christensen
11/19/2024, 8:17 PMEmil Christensen
11/19/2024, 8:18 PMEmil Christensen
11/19/2024, 8:19 PM@flow
def pipeline(filename: str, contents: str):
with transaction() as txn:
txn.set("filename", filename)
write_file(filename, contents)
Consume it:
@write_file.on_rollback
def del_file(txn):
"Deletes file."
os.unlink(txn.get("filename"))