Fix to continue with iteration when no access token is present - #17
Fix to continue with iteration when no access token is present#17railsmechanic wants to merge 1 commit into
Conversation
HerHde
left a comment
There was a problem hiding this comment.
Thanks for the contribution, @railsmechanic!
- Do you know how it comes that some users don't have an access token? Are we talking about a specific use case in a re-run or a bug causing it?
- I'd like to add a log entry on skip before merging this
Otherwise this looks good to me
To be honest, I can't give you a definite answer. I executed the script and at the point "Setting direct chats to be displayed as such for each user" the execution aborted with an error (faulty/missing) access token. Then I checked the SQLite database and noticed that there was no access token (
I'll adjust the PR to log, when a user is skipped. |
|
I guess it might be better to wait for more insight what causes that situation. If anyone else reads this, how did this happen? 😅 |
|
Another question that comes to my mind: Maybe you could try with this: Thanks a lot. |
I will test it again and report how it behaves now. Many thanks for your efforts. 👍 |
When a user has no access token, the script raises an error and stops. When re-running the script, it always stops at the same point. This fix skips users without or with an empty access token and continues the execution