Detecting incomplete file download from Google Photos

Just finished running this experiment. It helped me learn that rclone does delete partial downloads after some deadline is reached. See my update here for the details.

Question: Is there a way to reduce the context deadline?

I'd like to control it somehow so I can make it shorter. It seems to be ~25 minutes right now. I had a look at flags but couldn't see anything that allows me to control this. Ideally I'd set it so that partial downloads get deleted ~5 minutes after the internet or API disappears.

Next

I'm going re-run but with the timeout set to 2 hours (1 hour extra after --max-duration) to see if rclone also eventually gives up on files that it doesn't even start transferring. In my experiment, one file was never given up on by rclone even ~30 minutes after Google Photos API stopped responding.

2021/03/09 01:57:01 INFO  :
Transferred:       15.177G / 15.177 GBytes, 100%, 3.117 MBytes/s, ETA 0s
Errors:                10 (retrying may help)
Checks:             81283 / 81283, 100%
Transferred:          572 / 1436, 40%
Elapsed time:    1h27m0.0s
Transferring:
 * REDACTED 1…ID_20190829_041405.mp4: transferring

timeout: sending signal TERM to command ‘rclone’

NOTE: This file was never created on local disk by rclone so no deletion is necessary but if rclone gives up on trying to transfer then it can exit gracefully quickly without being forcefully killed by timeout.