File tree Expand file tree Collapse file tree 1 file changed +8
-2
lines changed
source/Halibut/Queue/Redis Expand file tree Collapse file tree 1 file changed +8
-2
lines changed Original file line number Diff line number Diff line change 1717using Halibut . Transport . Protocol ;
1818using Halibut . Util ;
1919using Nito . AsyncEx ;
20+ using StackExchange . Redis ;
2021
2122namespace Halibut . Queue . Redis
2223{
@@ -521,10 +522,15 @@ await Task.WhenAny(
521522 {
522523 if ( ! queueToken . IsCancellationRequested )
523524 {
524- log . WriteException ( EventType . Error , "Error occured dequeuing from the queue" , ex ) ;
525+ // If redis is down, don't log when dequeuing work since every polling service will log the issue every ~30s.
526+ if ( ex is not RedisConnectionException )
527+ {
528+ log . WriteException ( EventType . Error , "Error occured dequeuing from the queue" , ex ) ;
529+ }
530+
525531 // It is very likely a queue error means every tentacle will return an error.
526532 // Add a random delay to help avoid every client coming back at exactly the same time.
527- await Task . Delay ( TimeSpan . FromSeconds ( new Random ( ) . Next ( 15 ) ) , cts . Token ) ;
533+ await Task . Delay ( TimeSpan . FromSeconds ( new Random ( ) . Next ( halibutTimeoutsAndLimits . PollingQueueWaitTimeout . Seconds ) ) , cts . Token ) ;
528534 }
529535 throw ;
530536 }
You can’t perform that action at this time.
0 commit comments