mirror of
https://github.com/simplex-chat/simplexmq.git
synced 2026-10-22 11:32:24 +00:00
fix agent phase, test (#427)
This commit is contained in:
1 parent
9e0e6b1afc
commit
c2f1dabcd0
3 files changed
+40
-11
No files matched your search
@@ -644,7 +644,7 @@ cryptoError = \case
|
||||
|
||||
endAgentOperation :: AgentClient -> AgentOperation -> STM ()
|
||||
endAgentOperation c@AgentClient {agentEnv = Env {agentOperations}} op = do
|
||||
TM.alter (Just . maybe 0 (\n -> min 0 $ n - 1)) op agentOperations
|
||||
TM.alter (Just . maybe 0 (\n -> max 0 $ n - 1)) op agentOperations
|
||||
notifyAgentPhaseChanged c
|
||||
|
||||
beginAgentOperation :: AgentClient -> AgentOperation -> STM ()
|
||||
|
||||
@@ -127,7 +127,7 @@ data Env = Env
|
||||
}
|
||||
|
||||
data AgentOperation = AONetwork | AODatabase
|
||||
deriving (Eq, Ord)
|
||||
deriving (Eq, Ord, Show)
|
||||
|
||||
disallowedOperations :: AgentPhase -> [AgentOperation]
|
||||
disallowedOperations = \case
|
||||
|
||||
Reference in new issue
Block a user