equal
deleted
inserted
replaced
|
1 {-# LANGUAGE ScopedTypeVariables #-} |
|
2 |
1 module Main where |
3 module Main where |
2 |
4 |
3 import Prelude hiding (catch) |
5 import Prelude hiding (catch) |
4 import Control.Monad |
6 import Control.Monad |
5 import Control.Exception |
7 import Control.Exception |
43 SendStats clients rooms -> |
45 SendStats clients rooms -> |
44 run dbConn dbQueryStats [SqlInt32 $ fromIntegral clients, SqlInt32 $ fromIntegral rooms] >> return () |
46 run dbConn dbQueryStats [SqlInt32 $ fromIntegral clients, SqlInt32 $ fromIntegral rooms] >> return () |
45 |
47 |
46 |
48 |
47 dbConnectionLoop mySQLConnectionInfo = |
49 dbConnectionLoop mySQLConnectionInfo = |
48 Control.Exception.handle (\e -> return ()) $ handleSqlError $ |
50 Control.Exception.handle (\(_ :: IOException) -> return ()) $ handleSqlError $ |
49 bracket |
51 bracket |
50 (connectMySQL mySQLConnectionInfo) |
52 (connectMySQL mySQLConnectionInfo) |
51 (disconnect) |
53 (disconnect) |
52 (dbInteractionLoop) |
54 (dbInteractionLoop) |
53 |
55 |