mirror of
https://github.com/Start9Labs/start-os.git
synced 2026-03-26 10:21:52 +00:00
consistent casing
This commit is contained in:
committed by
Aiden McClelland
parent
d211de9782
commit
41b01efed3
@@ -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)
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user