Skip to content

Commit

Permalink
Add receptorctl work cancel doc and doc lint make targets (#1055)
Browse files Browse the repository at this point in the history
  • Loading branch information
thom-at-redhat committed Jun 6, 2024
1 parent 317b9fe commit afb23cd
Show file tree
Hide file tree
Showing 4 changed files with 43 additions and 1 deletion.
15 changes: 14 additions & 1 deletion docs/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,24 @@ BUILDDIR = build
# Put it first so that "make" without argument is like "make help".
help:
@$(SPHINXBUILD) -M help "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)
@echo -e " doc8 doc8 linter"
@echo -e " lint All documentation linters (including linkcheck)"
@echo -e " rstcheck rstcheck linter"

.PHONY: help Makefile server
.PHONY: doc8 help lint Makefile rstcheck server

doc8:
doc8 --ignore D001 .

# Documentation linters
lint: doc8 linkcheck rstcheck

rstcheck:
-rstcheck --recursive --warn-unknown-settings .

# Catch-all target: route all unknown targets to Sphinx using the new
# "make mode" option. $(O) is meant as a shortcut for $(SPHINXOPTS).
# Includes linkcheck
%: Makefile
@$(SPHINXBUILD) -M $@ "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)

Expand Down
2 changes: 2 additions & 0 deletions docs/requirements.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
doc8
pbr
rstcheck >= 6
six
sphinx
sphinx_ansible_theme
1 change: 1 addition & 0 deletions docs/source/receptorctl/receptorctl_index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -15,4 +15,5 @@ The Receptor client, ``receptorctl``, provides a command line interface for inte
receptorctl_status
receptorctl_traceroute
receptorctl_version
receptorctl_work_cancel
receptorctl_work_list
26 changes: 26 additions & 0 deletions docs/source/receptorctl/receptorctl_work_cancel.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
-----------
work cancel
-----------

.. contents::
:local:

``receptorctl work cancel`` terminates one or more units of work.

Command syntax: ``receptorctl --socket=<socket_path> work cancel <<Unit ID>> [...]``

``socket_path`` is the control socket address for the Receptor connection.
The default is ``unix:`` for a Unix socket.
Use ``tcp://`` for a TCP socket.
The corresponding environment variable is ``RECEPTORCTL_SOCKET``.

.. code-block:: text
ss --listening --processes --unix 'src = unix:<socket_path>'
Netid State Recv-Q Send-Q Local Address:Port Peer Address:Port Process
u_str LISTEN 0 4096 /tmp/local.sock 38130170 * 0 users:(("receptor",pid=3226769,fd=7))
``ps -fp $(pidof receptor)``
``lsof -p <pid>``

``Unit ID`` is a unique identifier for a work unit (job). When running the ``work cancel`` command, you should specify the ``Unit ID`` for the Receptor instance to which you are connected.

0 comments on commit afb23cd

Please sign in to comment.