When reading the docs for upload_session/finish_batch it says
For the same account, this route should be executed serially. That means you should not start the next ****** before current ****** finishes
I'm unsure whether that means I have to wait for the batch to finish with upload_session/finish_batch/check or not before starting the next batch?
It seems to work if I call upload_session/finish_batch/check in concurrently with opening a new batch.
However it also seems to drop files from the batch sometimes returning "too_many_write_operations" so maybe it isn't supported.
2021/03/19 09:21:03 DEBUG : HTTP REQUEST (req 0xc000f76000)
2021/03/19 09:21:03 DEBUG : POST /2/files/upload_session/finish_batch/check HTTP/1.1
Host: api.dropboxapi.com
User-Agent: rclone/v1.55.0-DEV
Content-Length: 113
Authorization: XXXX
Content-Type: application/json
Accept-Encoding: gzip
{"async_******_id":"dbjid:AABy2FH-VQkY-9lq_BMdfJVJI2_C-vRjliacnw5tIIKeKFitZxUgGsnWlDim84xSqANIbZr2bmqWWWRIPl7Dw_69"}
2021/03/19 09:21:04 DEBUG : HTTP RESPONSE (req 0xc000f76000)
2021/03/19 09:21:04 DEBUG : HTTP/2.0 200 OK
Accept-Encoding: identity,gzip
Cache-Control: no-cache
Content-Type: application/json
Date: Fri, 19 Mar 2021 09:21:03 GMT
Server: envoy
Vary: Accept-Encoding
X-Content-Type-Options: nosniff
X-Dropbox-Request-Id: f1ed7f49b82e4b08b96a6aa47c13b688
X-Dropbox-Response-Origin: far_remote
X-Frame-Options: SAMEORIGIN
X-Server-Response-Time: 63
{".tag": "complete", "entries": [{".tag": "failure", "failure": {".tag": "too_many_write_operations"}}, {".tag": "failure", "failure": {".tag": "too_many_write_operations"}}, {".tag": "failure", "failure": {".tag": "too_many_write_operations"}}, {".tag": "failure", "failure": {".tag": "too_many_write_operations"}}, {".tag": "failure", "failure": {".tag": "too_many_write_operations"}}, {".tag": "failure", "failure": {".tag": "too_many_write_operations"}}, {".tag": "failure", "failure": {".tag": "too_many_write_operations"}}, {".tag": "failure", "failure": {".tag": "too_many_write_operations"}}, {".tag": "failure", "failure": {".tag": "too_many_write_operations"}}, {".tag": "failure", "failure": {".tag": "too_many_write_operations"}}, {".tag": "failure", "failure": {".tag": "too_many_write_operations"}}]}
It is, of course, a lot faster waiting for multiple batches to complete concurrently!