On 17/06/15 22:22, Yang Yuanzhe wrote:
Hi Andy,
How is everything going?
I am using another system to control the backup and restore process of
Fuseki. However an inconvenience is that I don't know the file name to
be used for the backup so I need to discover it manually. Is there a way
to get it from the JSON response?
Not currently - the response contains the task id.
Contributions for improvements welcome.
In fact I discovered that the file name is always like
"ds_2015-06-17_12-20-31.nq.gz", a dataset name with timestamp connected
by underscores. And the value of the timestamp is always the same as
the starting time of the backup task in the JSON response. Well, I am
not sure if it is always the same. Maybe in some slow machines or due to
network failures it could be different? Is it safe if I guess the file
name in this way?
See the code in "ActionBackup".
It is the time the async thread starts.
It is written to the log file.
Another question, my current implementation to check if the backup is
completed is checking the JSON response given a task ID. If the field
"Finished" exists, then the backup is considered completed. So far it
works fine. However I am wondering what will happen if an exception
terminates the backup. Will there be a "Finished" field or any other
field indicating a failure then?
From the point of view of an async task, anything is the task ending.
There is a try/catch(Exception) in AsyncTask protecting the action.
Thank you for your suggestion in advance and have a nice day.
Regards,
Yang
Andy