Blocking Call to Document.save[As]
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Hi,
The API supports a callback that is called when a data file upload has completed including any cloud side translation, which is demonstrated by the Save and Insert File API Sample.
However, there are situations in my script where I just need to wait until the save is complete and can't continue until it is, e.g.
doc.save("new version")
# WAIT UNTIL SAVE COMPLETES
nextFunction()
Is there a way to do this with the API, for example by receiving a "future" object representing the result of the save, that can be waited on with future.result(timeout)? I note that the DataFolder and Component classes seems to support a DataFileFuture, but for some reason the Document.save[As] mechanism doesn't?
Will this functionality be coming to the API/or is there an example of how I can achieve what I am asking? I know it is less efficient, but in my use-case async programming just complicates my script which is essentially just automation of a human workflow.
Thank you!