consistent casing

This commit is contained in:
Keagan McClelland
2021-01-18 20:55:18 -07:00
committed by Aiden McClelland
parent d211de9782
commit 41b01efed3
3 changed files with 5 additions and 5 deletions

View File

@@ -113,7 +113,7 @@ makeFoundation appSettings = do
appSelfUpdateSpecification <- newEmptyMVar
appIsUpdating <- newIORef Nothing
appIsUpdateFailed <- newIORef Nothing
appOSVersionLatest <- newIORef Nothing
appOsVersionLatest <- newIORef Nothing
appBackgroundJobs <- newTVarIO (JobCache HM.empty)
def <- getDefaultProcDevMetrics
appProcDevMomentCache <- newIORef (now, mempty, def)

View File

@@ -69,7 +69,7 @@ data AgentCtx = AgentCtx
, appWebServerThreadId :: IORef (Maybe ThreadId)
, appIsUpdating :: IORef (Maybe Version)
, appIsUpdateFailed :: IORef (Maybe S9Error)
, appOSVersionLatest :: IORef (Maybe OsVersionCache)
, appOsVersionLatest :: IORef (Maybe OsVersionCache)
, appProcDevMomentCache :: IORef (UTCTime, ProcDevMomentStats, ProcDevMetrics)
, appSelfUpdateSpecification :: MVar VersionRange
, appBackgroundJobs :: TVar JobCache

View File

@@ -61,7 +61,7 @@ getServerR = handleS9ErrT $ do
wifi <- WpaSupplicant.runWlan0 $ liftA2 WifiList WpaSupplicant.getCurrentNetwork WpaSupplicant.listNetworks
specs <- getSpecs settings
welcomeAck <- fmap isJust . lift . runDB . Persist.get $ WelcomeAckKey agentVersion
versionLatest <- liftIO $ (try @SomeException $ getOSVersionLatest agentCtx) >>= \case
versionLatest <- liftIO $ (try @SomeException $ getOsVersionLatest agentCtx) >>= \case
Left e -> (putStrLn @Text $ "Error fetching latest OS Version: " <> show e) $> Nothing
Right a -> pure a
@@ -150,8 +150,8 @@ patchNullableFile path = do
expirationOsVersionLatest :: Num a => a
expirationOsVersionLatest = 60
getOSVersionLatest :: MonadIO m => AgentCtx -> m (Maybe Version)
getOSVersionLatest ctx = do
getOsVersionLatest :: MonadIO m => AgentCtx -> m (Maybe Version)
getOsVersionLatest ctx = do
now <- liftIO getCurrentTime
let osVersionCache = appOSVersionLatest ctx
mCache <- liftIO . readIORef $ osVersionCache