Expect board might have no threads

This commit is contained in:
phil@volguine.com 2023-10-13 20:47:00 +00:00
parent 718ec98475
commit df94847946
3 changed files with 3 additions and 3 deletions

View File

@ -37,7 +37,7 @@ while IFS= read -r BACKUP_PATH; do
sed -e 's|\("backup_read_root": \)".*"|\1"'"$BACKUP_PATH"'"|' "$SETTINGS_FILE" > "temp_$SETTINGS_FILE"
# Run the Haskell program with the updated settings file
$PROG +RTS -N2 -RTS "temp_$SETTINGS_FILE"
time $PROG +RTS -N2 -RTS "temp_$SETTINGS_FILE"
done < "$PATHS_FILE"
# Optionally, remove the temporary settings file

View File

@ -226,7 +226,7 @@ processBoard settings board = do
case result of
Right catalogs -> do
let threads_on_board = concatMap threads catalogs
let threads_on_board = concatMap ((maybe [] id) . threads) catalogs
all_threads_for_board :: [ Threads.Thread ] <- ensureThreads settings board threads_on_board

View File

@ -42,7 +42,7 @@ instance FromJSON Thread
--instance ToJSON Thread
data Catalog = Catalog
{ threads :: [Thread]
{ threads :: Maybe [Thread]
, page :: Int
} deriving (Show, Generic)