diff options
author | Zach Copley <zach@status.net> | 2010-01-13 19:15:54 +0000 |
---|---|---|
committer | Zach Copley <zach@status.net> | 2010-01-13 19:15:54 +0000 |
commit | da5e6a6023b33c51a10f335317ca8b4e18af1e2b (patch) | |
tree | 9ab487718acddb879c91cf10d2430616c319ead0 | |
parent | 7aa43f3c93a5434b59a66824b2816d5ba8cf1978 (diff) |
When Twitter bridge encounters a 403 (rate limit) err, drop the notice
instead of requeuing.
-rw-r--r-- | plugins/TwitterBridge/twitter.php | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/plugins/TwitterBridge/twitter.php b/plugins/TwitterBridge/twitter.php index e133ce6f7..33dfb788b 100644 --- a/plugins/TwitterBridge/twitter.php +++ b/plugins/TwitterBridge/twitter.php @@ -269,19 +269,23 @@ function process_error($e, $flink, $notice) common_log(LOG_WARNING, $logmsg); - if ($code == 401) { - + switch($code) { + case 401: // Probably a revoked or otherwise bad access token - nuke! - remove_twitter_link($flink); return true; - - } else { + break; + case 403: + // User has exceeder her rate limit -- toss the notice + return true; + break; + default: // For every other case, it's probably some flakiness so try // sending the notice again later (requeue). return false; + break; } } |