mirror of
https://github.com/commercialhaskell/stackage-server.git
synced 2026-01-11 19:58:28 +01:00
Add a warning when NoSnapshotFile
This commit is contained in:
parent
6bf160f210
commit
d0eba4e31e
@ -530,8 +530,7 @@ decideOnSnapshotUpdate SnapshotFileInfo {sfiSnapName, sfiUpdatedOn, sfiSnapshotF
|
|||||||
run (getBy (UniqueSnapshot sfiSnapName)) >>= \case
|
run (getBy (UniqueSnapshot sfiSnapName)) >>= \case
|
||||||
-- exists, up to date, no force-updated requested; nothing to do
|
-- exists, up to date, no force-updated requested; nothing to do
|
||||||
Just (Entity _key snap)
|
Just (Entity _key snap)
|
||||||
| snapshotUpdatedOn snap == Just sfiUpdatedOn && not forceUpdate -> do
|
| snapshotUpdatedOn snap == Just sfiUpdatedOn && not forceUpdate ->
|
||||||
logInfo $ mkLogMsg "already exists and is up to date."
|
|
||||||
return NothingToDo
|
return NothingToDo
|
||||||
-- exists but updatedOn was not previously set.
|
-- exists but updatedOn was not previously set.
|
||||||
Just entity@(Entity _key snap)
|
Just entity@(Entity _key snap)
|
||||||
@ -546,8 +545,8 @@ decideOnSnapshotUpdate SnapshotFileInfo {sfiSnapName, sfiUpdatedOn, sfiSnapshotF
|
|||||||
Nothing -> maybe NoSnapshotFile DoesntExist <$> sfiSnapshotFileGetter
|
Nothing -> maybe NoSnapshotFile DoesntExist <$> sfiSnapshotFileGetter
|
||||||
-- Add new snapshot to the database, when necessary
|
-- Add new snapshot to the database, when necessary
|
||||||
case mKeySnapFile of
|
case mKeySnapFile of
|
||||||
NothingToDo -> return Nothing
|
NothingToDo -> Nothing <$ logInfo (mkLogMsg "already exists and is up to date.")
|
||||||
NoSnapshotFile -> return Nothing
|
NoSnapshotFile -> Nothing <$ logWarn (mkLogMsg "has no (readable?) snapshot file.")
|
||||||
NeedsUpdate (Entity oldSnapKey oldSnap) sf@SnapshotFile {sfCompiler, sfPublishDate}
|
NeedsUpdate (Entity oldSnapKey oldSnap) sf@SnapshotFile {sfCompiler, sfPublishDate}
|
||||||
| Just publishDate <- sfPublishDate -> do
|
| Just publishDate <- sfPublishDate -> do
|
||||||
let updatedSnap =
|
let updatedSnap =
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user