flush queued changes to export db on exit
This commit is contained in:
parent
42eaa340fe
commit
2c90ed1fea
2 changed files with 3 additions and 1 deletions
|
@ -108,6 +108,8 @@ seek o = do
|
|||
seekActions $ pure $ map (startExport r db) l
|
||||
void $ liftIO cleanup'
|
||||
|
||||
closeDb db
|
||||
|
||||
startExport :: Remote -> ExportHandle -> Git.LsTree.TreeItem -> CommandStart
|
||||
startExport r db ti = do
|
||||
ek <- exportKey (Git.LsTree.sha ti)
|
||||
|
|
|
@ -30,7 +30,7 @@ import Types.Remote (ExportLocation(..))
|
|||
import Database.Persist.TH
|
||||
import Database.Esqueleto hiding (Key)
|
||||
|
||||
data ExportHandle = ExportHandle H.DbQueue
|
||||
newtype ExportHandle = ExportHandle H.DbQueue
|
||||
|
||||
share [mkPersist sqlSettings, mkMigrate "migrateExport"] [persistLowerCase|
|
||||
Exported
|
||||
|
|
Loading…
Reference in a new issue