Closed jone closed 2 years ago
Hi @jone
This is the rate limit that Google is applying to Google Photos API, so It's difficult to avoid this issue.
General quota limit The quota limit for requests to the Library API is 10,000 requests per project per day. Requests to access media bytes (like loading a photo or video) are not counted against the limit.
Exceeding quota limits If the quota of requests to the Library API is exceeded, the API returns an error code 429 and a message that the project has exceeded the quota. For more information, see the Terms of Service.
@pacoorozco or @int128, is there a straightforward way to restart an upload sequence that failed due to this quota error? Or is there a way to get gpup to avoid uploading media that was previously successfully uploaded (e.g. via checksum comparison btw local media file and the remote one)?
Hi @felciano
I'm using this script that keeps track of uploaded directories, so I can resume it later or I can do periodic syncs. You are free to modify it to keep track of files (instead of directories). Bear in mind that Google doesn't allow to upload twice the same file :-D
Feedback is welcomed :-D
https://github.com/int128/gpup/pull/46 (modifying the support for more retry-ability could be done like so). Either with status code or with status code and error message.
Hey there
When uploading large amounts of photos at once I'm hitting a quota:
Unfortunately I'm not that familiar with Go, but as far as I could interpret the code I suspect that gpup does not detect that problem and retry uploading this particular image: the response status is 400, but retry does only work with codes of 500 and greater. I guess there is no way to circumvent the quota, with another type of account, right? Or did I do something wrong?
I'd suggest to implement a sleep / retry strategy, but I'm not familiar enough with the Go environment to do that on may own.