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
157
Issues
157
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
163f899b
Verified
Commit
163f899b
authored
Oct 23, 2024
by
Przemyslaw Kaminski
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[cli] more detailed worker stats reporting (list messages)
parent
763d4d35
Pipeline
#6888
failed with stages
in 19 minutes and 11 seconds
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
16 additions
and
7 deletions
+16
-7
Worker.hs
bin/gargantext-cli/CLI/Worker.hs
+14
-5
cabal.project
cabal.project
+2
-2
No files found.
bin/gargantext-cli/CLI/Worker.hs
View file @
163f899b
...
...
@@ -70,9 +70,18 @@ workerCLI (CLIW_stats (WorkerStatsArgs { .. })) = do
let
ws
=
env
^.
hasConfig
.
gc_worker
mapM_
(
\
wd
->
do
state'
<-
initWorkerState
env
wd
let
b
=
W
.
broker
state'
let
q
=
W
.
queueName
state'
qs
<-
BT
.
getQueueSize
(
W
.
broker
state'
)
q
qs
<-
BT
.
getQueueSize
b
q
msgIds
<-
BT
.
listPendingMessageIds
b
q
putStrLn
(
"Queue: "
<>
show
q
<>
", size: "
<>
show
qs
::
Text
)
putStrLn
(
" Messages: "
::
Text
)
mapM_
(
\
msgId
->
do
mm
<-
BT
.
getMessageById
b
q
msgId
case
mm
of
Nothing
->
putStrLn
(
" - "
<>
show
msgId
<>
" :: NOTHING!"
::
Text
)
Just
m
->
putStrLn
(
" - "
<>
show
m
::
Text
)
)
msgIds
)
(
_wsDefinitions
ws
)
...
...
@@ -82,10 +91,10 @@ workerCmd = command "worker" (info (helper <*> (fmap CLISub $ fmap CCMD_worker w
workerParser
::
Parser
CLIWorker
workerParser
=
hsubparser
(
(
command
"run"
(
info
(
helper
<*>
worker_p
)
(
progDesc
"Run a single worker"
)
))
<>
(
command
"stats"
(
info
(
helper
<*>
stats_p
)
(
progDesc
"Print queue stats"
)
))
command
"run"
(
info
(
helper
<*>
worker_p
)
(
progDesc
"Run a single worker"
))
<>
command
"stats"
(
info
(
helper
<*>
stats_p
)
(
progDesc
"Print queue stats"
))
)
worker_p
::
Parser
CLIWorker
...
...
cabal.project
View file @
163f899b
...
...
@@ -191,12 +191,12 @@ source-repository-package
source
-
repository
-
package
type
:
git
location
:
https
://
gitlab
.
iscpif
.
fr
/
gargantext
/
haskell
-
pgmq
tag
:
0591
a643d8ba1776af4fac56c1e4ff5fc3e98bb
3
tag
:
1
dd92f0aa8e9f8096064e5656c336e562680f4e
3
source
-
repository
-
package
type
:
git
location
:
https
://
gitlab
.
iscpif
.
fr
/
gargantext
/
haskell
-
bee
tag
:
00
a4113992545d1e0a78b9f73a69ec527e79bd1b
tag
:
ec2c3f345049f7cd0b8f4e39edf11c7e437d0cf6
source
-
repository
-
package
type
:
git
...
...
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