From a1ba710d42c295270f02a090492323d83b807c3c Mon Sep 17 00:00:00 2001 From: Jon Kristensen Date: Tue, 19 Jan 2016 21:13:16 +0100 Subject: [PATCH] Fix a video processing bug (#9) --- server/source/Main.hs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/server/source/Main.hs b/server/source/Main.hs index 892a062..08c4979 100644 --- a/server/source/Main.hs +++ b/server/source/Main.hs @@ -50,7 +50,9 @@ uploadThread :: ConnectionPool -> IO () uploadThread pool = forever $ do threadDelay $ 5 * 10^6 flip runReaderT pool $ do - uploads <- runQuery $ E.select $ E.from $ \video -> return video + uploads <- runQuery $ E.select $ E.from $ \video -> do + E.where_ (video E.^. VideoStatus E.==. E.val Processing) + return video forM_ uploads $ \uploadEntity -> do let uuid = videoUuid $ entityVal uploadEntity -- Quality factor of 3, 10 seconds in (putting a "-ss" parameter to