cofacts / rumors-fb-bot

Facebook Messenger bot that checks if a message contains internet rumor.
MIT License
1 stars 3 forks source link

Race condition for page access tokens #6

Open changhc opened 5 years ago

changhc commented 5 years ago

Now the page access token is renewed every 14 days. During renewal, we need some lock to block access to the token, or requests may fail due to the use of old tokens.

Currently we just handle this kind of error by asking the user to retry or letting the request fail silently (and users will retry themselves). Should think about how to implement something like a mutex.