-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
handle TNS "too many requests" message more gracefully #26
Comments
I've fixed this issue before here where I just sleep the code until the API lets us query again. A solution like this will ensure completeness of SAGUARO's TNS data "copy". Although, I understand why something like this could be suboptimal for code we want to finish quickly (like the vetting code). So, I'm thinking that we may want to record our position in the TNS query when the API throttles our usage in the vetting code, finish the vetting code with just the objects that we have pulled in, and then repeat everything until we finish querying TNS. This way the code will always be running and it gives us a complete sample of TNS objects. Thoughts? We can also discuss this more Thursday. |
I think this is a different situation, because we are not attempting to make a full copy of the TNS here. We already make a copy of their targets table hourly (outside the TOM). This is just to retrieve photometry for any new targets. This will never be complete anyway, because people could always add new photometry. For that reason, I don't think we need to worry about keeping track of whether a target failed. I would suggest just trying 1 or 2 more times with a short sleep in between, and then giving up on the TNS portion if it still doesn't work. Our main concerns are (1) not letting it take so long that people get frustrated if the page doesn't reload quickly and (2) not letting the |
Just summarizing our discussion in person about this issue and how we want to fix it:
|
add the timelimit keyword to the tns photometry query (issue #26)
Right now, the vetting code completely crashes with a JSON decoding error when the TNS throttles our API usage. We should check for that case and just skip over it, so that the rest of the vetting code can continue.
The text was updated successfully, but these errors were encountered: