mirror of
https://github.com/simplex-chat/simplexmq.git
synced 2026-05-13 01:24:59 +00:00
smp server: optionally append store log with postgres storage (without loading and compacting, for debugging during migration) (#1480)
* smp server: optionally maintain store log with postgres storage (without loading and compacting, for debugging during migration) * refactor * remove comment
This commit is contained in:
@@ -28,7 +28,6 @@ import Simplex.Messaging.Server.MsgStore.Types
|
||||
import Simplex.Messaging.Server.QueueStore
|
||||
import Simplex.Messaging.Server.QueueStore.STM
|
||||
import Simplex.Messaging.Server.QueueStore.Types
|
||||
import Simplex.Messaging.Server.StoreLog
|
||||
import Simplex.Messaging.Util ((<$$>), ($>>=))
|
||||
|
||||
data STMMsgStore = STMMsgStore
|
||||
@@ -77,8 +76,8 @@ instance MsgStoreClass STMMsgStore where
|
||||
queueStore_ <- newQueueStore @STMQueue ()
|
||||
pure STMMsgStore {storeConfig, queueStore_}
|
||||
|
||||
closeMsgStore st = readTVarIO (storeLog $ queueStore_ st) >>= mapM_ closeStoreLog
|
||||
|
||||
closeMsgStore = closeQueueStore @STMQueue . queueStore_
|
||||
{-# INLINE closeMsgStore #-}
|
||||
withActiveMsgQueues = withLoadedQueues . queueStore_
|
||||
{-# INLINE withActiveMsgQueues #-}
|
||||
withAllMsgQueues _ = withLoadedQueues . queueStore_
|
||||
|
||||
Reference in New Issue
Block a user