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
155
Issues
155
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
91c73c45
Commit
91c73c45
authored
5 months ago
by
Grégoire Locqueville
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Removed dead module Nanomsg
parent
b89fdced
Pipeline
#7135
canceled with stages
in 9 seconds
Changes
3
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
0 additions
and
70 deletions
+0
-70
gargantext.cabal
gargantext.cabal
+0
-1
Types.hs
src/Gargantext/Core/Notifications/Dispatcher/Types.hs
+0
-31
Nanomsg.hs
src/Gargantext/Core/Notifications/Nanomsg.hs
+0
-38
No files found.
gargantext.cabal
View file @
91c73c45
...
...
@@ -201,7 +201,6 @@ library
Gargantext.Core.Notifications.Dispatcher.Subscriptions
Gargantext.Core.Notifications.Dispatcher.Types
Gargantext.Core.Notifications.Dispatcher.WebSocket
Gargantext.Core.Notifications.Nanomsg
Gargantext.Core.Text
Gargantext.Core.Text.Context
Gargantext.Core.Text.Corpus.API
...
...
This diff is collapsed.
Click to expand it.
src/Gargantext/Core/Notifications/Dispatcher/Types.hs
View file @
91c73c45
...
...
@@ -91,35 +91,6 @@ instance ToJSON Topic where
]
toJSON
Ping
=
Aeson
.
object
[
"type"
.=
(
"ping"
::
Text
)
]
-- | A job status message
-- newtype MJobStatus = MJobStatus (JobStatus 'Safe JobLog)
-- instance Prelude.Show MJobStatus where
-- show (MJobStatus js) = "MJobStatus " <> show (CBUTF8.decode $ BSL.unpack $ Aeson.encode js)
-- instance ToJSON MJobStatus where
-- toJSON (MJobStatus js) = Aeson.object [
-- "type" .= toJSON ("MJobLog" :: Text)
-- , "job_status" .= toJSON js
-- ]
-- instance FromJSON MJobStatus where
-- parseJSON = Aeson.withObject "MJobStatus" $ \o -> do
-- js <- o .: "job_status"
-- pure $ MJobStatus js
-- | A job progress message
-- newtype MJobLog = MJobLog JobLog
-- instance Prelude.Show MJobLog where
-- show (MJobLog jl) = "MJobLog " <> show jl
-- instance ToJSON MJobLog where
-- toJSON (MJobLog jl) = Aeson.object [
-- "type" .= toJSON ("MJobLog" :: Text)
-- , "job_log" .= toJSON jl
-- ]
-- instance FromJSON MJobLog where
-- parseJSON = Aeson.withObject "MJobLog" $ \o -> do
-- jl <- o .: "job_log"
-- pure $ MJobLog jl
data
ConnectedUser
=
CUUser
UserId
...
...
@@ -136,8 +107,6 @@ instance Eq WSKeyConnection where
(
==
)
(
WSKeyConnection
(
key1
,
_conn1
))
(
WSKeyConnection
(
key2
,
_conn2
))
=
key1
==
key2
instance
Show
WSKeyConnection
where
showsPrec
d
(
WSKeyConnection
(
key
,
_conn
))
=
showsPrec
d
$
"WSKeyConnection "
<>
key
showWSKeyConnection
::
WSKeyConnection
->
Text
showWSKeyConnection
ws
=
"WSKeyConnection "
<>
show
(
wsKey
ws
)
wsKey
::
WSKeyConnection
->
ByteString
wsKey
(
WSKeyConnection
(
key
,
_conn
))
=
key
wsConn
::
WSKeyConnection
->
WS
.
Connection
...
...
This diff is collapsed.
Click to expand it.
src/Gargantext/Core/Notifications/Nanomsg.hs
deleted
100644 → 0
View file @
b89fdced
{-|
Module : Gargantext.Core.Notifications.Nanomsg
Description : Nanomsg utils
Copyright : (c) CNRS, 2017-Present
License : AGPL + CECILL v3
Maintainer : team@gargantext.org
Stability : experimental
Portability : POSIX
https://gitlab.iscpif.fr/gargantext/haskell-gargantext/issues/341
Docs:
https://dev.sub.gargantext.org/#/share/Notes/187918
-}
module
Gargantext.Core.Notifications.Nanomsg
where
import
Gargantext.Prelude
import
Nanomsg
withSafeSocket
::
SocketType
a
=>
Text
->
a
->
(
Socket
a
->
IO
c
)
->
IO
c
withSafeSocket
socketName
t
=
bracket
onOpen
onClose
where
onOpen
=
do
s
<-
socket
t
setRcvBuf
s
1
setSndBuf
s
1
rcvBufInt
<-
rcvBuf
s
sndBufInt
<-
sndBuf
s
putText
$
"["
<>
socketName
<>
"] rcvBuf: "
<>
show
rcvBufInt
<>
", sndBuf: "
<>
show
sndBufInt
pure
s
onClose
s
=
do
close
s
panicTrace
$
"[withSafeSocket] "
<>
socketName
<>
" closed"
This diff is collapsed.
Click to expand it.
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