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
API login retry logic not working #69
Comments
This is, of course, why the bot didn't upload any tables today. |
I've restarted the upload worker and requeued the failed jobs. Some of them that failed were also update jobs, which seem to have some kind of stale database connection as well. |
The attempted fix (no-op token refresh) didn't work. Next step is to fork the mwclient repo and attempt a fix there. |
I tried replicating some of the code that I use in api.py in a simple script so I could inspect the results. Interestingly, I got the following when trying the second login attempt:
I think the answer might just be to throw out the entire mwclient Site object when a retry is necessary. |
Restart the upload worker jobs as part of the cron job to avoid #69
Restart the upload worker jobs as part of the cron job to avoid #69
The retry logic that was added in d5769dd is not working.
Here is the relevant snippet from the logs:
My current best guess, from looking at the mwclient code, is that the
page
object keeps a reference to the site it was pulled from, so that logging in again on the global site object perhaps doesn't do anything.The other problem is that this is hard to test on Wikipedia, since the login time is presumably pretty long.
The text was updated successfully, but these errors were encountered: