Class: Citadel::MatrixInterceptor
- Inherits:
-
Object
- Object
- Citadel::MatrixInterceptor
- Defined in:
- lib/citadel/matrix_interceptor.rb
Instance Method Summary collapse
Instance Method Details
#need_to_wait_and_retry(response) ⇒ Object
5 6 7 8 9 10 11 12 13 |
# File 'lib/citadel/matrix_interceptor.rb', line 5 def need_to_wait_and_retry(response) wait_time = JSON.parse(response.body)['retry_after_ms'] if wait_time sleep((wait_time / 1000).ceil + 1) return true else return false end end |