refactor: hlint

This commit is contained in:
Gregor Kleen 2020-07-17 16:52:34 +02:00
parent cadb18df7b
commit fc49f46f50
2 changed files with 3 additions and 6 deletions

View File

@ -11,6 +11,7 @@
- ignore: { name: "Use ++" }
- ignore: { name: "Use ***" }
- ignore: { name: "Redundant void" }
- ignore: { name: "Too strict maybe" }
- arguments:
- -XQuasiQuotes

View File

@ -150,9 +150,7 @@ withFailover' testTarget' f@Failover{..} mode detAcceptable act = withFailoverRe
$logErrorS "withFailover'" $ tshow (hashUnique alreadyTested) <> " recording failure for item " <> failoverLabel
atomically . modifyTVar failover $ \failover' -> if
| views (P.focus . _failoverReferences) (Set.member currentlyTesting) failover'
-> case P.next failover' of
Just failover'' -> failover''
Nothing -> failover'
-> fromMaybe failover' $ P.next failover'
| otherwise
-> failover'
@ -212,7 +210,7 @@ failoverMetrics fLbl failoverMetricsFailover@Failover{..} = Metric $ do
now <- liftIO $ getTime Monotonic
cTime <- liftIO getPOSIXTime
metrics <- atomically $ do
atomically $ do
foState <- readTVar failover
labelsSeen' <- stateTVar labelsSeen $ \labelsSeen' -> labelsSeen'
& ala Endo foldMap [ Map.insert failoverLabel failoverLastTest | FailoverItem{..} <- F.toList foState ]
@ -228,8 +226,6 @@ failoverMetrics fLbl failoverMetricsFailover@Failover{..} = Metric $ do
]
]
return metrics
failoverActiveInfo = Info "uni2work_failover_active_bool"
"Currently active item in the failover set"
failoverLastTestInfo = Info "uni2work_failover_last_test_time"