Skip to content

Commit

Permalink
Fix a video processing bug (#9)
Browse files Browse the repository at this point in the history
  • Loading branch information
Jon Kristensen committed Jan 19, 2016
1 parent 08e9bf3 commit a1ba710
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion server/source/Main.hs
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit a1ba710

Please sign in to comment.