Expect board might have no threads
This commit is contained in:
parent
718ec98475
commit
df94847946
|
@ -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"
|
sed -e 's|\("backup_read_root": \)".*"|\1"'"$BACKUP_PATH"'"|' "$SETTINGS_FILE" > "temp_$SETTINGS_FILE"
|
||||||
|
|
||||||
# Run the Haskell program with the updated 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"
|
done < "$PATHS_FILE"
|
||||||
|
|
||||||
# Optionally, remove the temporary settings file
|
# Optionally, remove the temporary settings file
|
||||||
|
|
|
@ -226,7 +226,7 @@ processBoard settings board = do
|
||||||
|
|
||||||
case result of
|
case result of
|
||||||
Right catalogs -> do
|
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
|
all_threads_for_board :: [ Threads.Thread ] <- ensureThreads settings board threads_on_board
|
||||||
|
|
||||||
|
|
|
@ -42,7 +42,7 @@ instance FromJSON Thread
|
||||||
--instance ToJSON Thread
|
--instance ToJSON Thread
|
||||||
|
|
||||||
data Catalog = Catalog
|
data Catalog = Catalog
|
||||||
{ threads :: [Thread]
|
{ threads :: Maybe [Thread]
|
||||||
, page :: Int
|
, page :: Int
|
||||||
} deriving (Show, Generic)
|
} deriving (Show, Generic)
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue