Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
haskell-gargantext
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
144
Issues
144
List
Board
Labels
Milestones
Merge Requests
9
Merge Requests
9
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
gargantext
haskell-gargantext
Commits
2820bede
Verified
Commit
2820bede
authored
Sep 27, 2024
by
Przemyslaw Kaminski
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[ws] remove debug logs for centralexchange
parent
45eff945
Pipeline
#6719
passed with stages
in 87 minutes and 18 seconds
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
7 deletions
+7
-7
CentralExchange.hs
src/Gargantext/Core/AsyncUpdates/CentralExchange.hs
+7
-7
No files found.
src/Gargantext/Core/AsyncUpdates/CentralExchange.hs
View file @
2820bede
...
...
@@ -24,7 +24,7 @@ import Control.Concurrent.STM.TChan qualified as TChan
import
Data.Aeson
qualified
as
Aeson
import
Data.ByteString.Lazy
qualified
as
BSL
import
Data.Text
qualified
as
T
import
Data.Text.Encoding
qualified
as
TE
--
import Data.Text.Encoding qualified as TE
import
Gargantext.Core.AsyncUpdates.CentralExchange.Types
import
Gargantext.Core.Config.Types
(
NotificationsConfig
(
..
))
import
Gargantext.Prelude
...
...
@@ -58,11 +58,11 @@ gServer (NotificationsConfig { .. }) = do
-- | the 'tChan' and calls Dispatcher accordingly. This is to
-- | make reading nanomsg as fast as possible.
void
$
Async
.
concurrently
(
worker
s_dispatcher
tChan
)
$
do
withLogger
()
$
\
ioLogger
->
do
withLogger
()
$
\
_
ioLogger
->
do
forever
$
do
-- putText "[central_exchange] receiving"
r
<-
recv
s
logMsg
ioLogger
INFO
$
"[central_exchange] received: "
<>
show
r
-- logMsg ioLogger DEBU
$ "[central_exchange] received: " <> show r
-- C.putStrLn $ "[central_exchange] " <> r
atomically
$
TChan
.
writeTChan
tChan
r
where
...
...
@@ -75,8 +75,8 @@ gServer (NotificationsConfig { .. }) = do
-- logMsg ioLogger DEBUG $ "[central_exchange] " <> show ujp
-- send the same message that we received
void
$
sendNonblocking
s_dispatcher
r
Just
(
UpdateTreeFirstLevel
node_id
)
->
do
logMsg
ioLogger
INFO
$
"[central_exchange] update tree: "
<>
show
node_id
Just
(
UpdateTreeFirstLevel
_
node_id
)
->
do
-- logMsg ioLogger DEBUG
$ "[central_exchange] update tree: " <> show node_id
-- putText $ "[central_exchange] sending that to the dispatcher: " <> show node_id
-- To make this more robust, use withAsync so we don't
-- block the main thread (send is blocking)
...
...
@@ -102,6 +102,6 @@ notify (NotificationsConfig { _nc_central_exchange_connect }) ceMessage = do
withSocket
Push
$
\
s
->
do
_
<-
connect
s
$
T
.
unpack
_nc_central_exchange_connect
let
str
=
Aeson
.
encode
ceMessage
withLogger
()
$
\
ioLogger
->
logMsg
ioLogger
DEBUG
$
"[central_exchange] sending: "
<>
(
T
.
unpack
$
TE
.
decodeUtf8
$
BSL
.
toStrict
str
)
--
withLogger () $ \ioLogger ->
--
logMsg ioLogger DEBUG $ "[central_exchange] sending: " <> (T.unpack $ TE.decodeUtf8 $ BSL.toStrict str)
void
$
sendNonblocking
s
$
BSL
.
toStrict
str
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment