feat: Add Retry-After hint (#1916)

Add Retry-After header when response status is 503.
Its value is the connection worker delay(seconds) when
it's recovering.

This closes issue #1817.
This commit is contained in:
Gaurav Gautam
2021-08-18 10:14:29 -05:00
committed by GitHub
parent 5874482f03
commit d9f1ae6a46
4 changed files with 23 additions and 4 deletions
+1
View File
@@ -144,6 +144,7 @@ connectionStatus appState =
"Attempting to reconnect to the database in "
<> (show delay::Text)
<> " seconds..."
when itShould $ AppState.putRetryNextIn appState delay
return itShould
-- | Load the DbStructure by using a connection from the pool.