File: debusine-worker-cli.rst

package info (click to toggle)
debusine 0.14.2
  • links: PTS, VCS
  • area: main
  • in suites: forky
  • size: 15,200 kB
  • sloc: python: 195,951; sh: 849; javascript: 335; makefile: 116
file content (61 lines) | stat: -rw-r--r-- 1,851 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
.. _debusine-worker-cli:

===========================
The debusine-worker command
===========================

The ``debusine-worker`` command starts a :ref:`Worker
<explanation-workers>`.  It is provided by the ``debusine-worker``
package.

``debusine-worker`` has few options, described in ``--help``:

.. code-block:: console

    $ debusine-worker --help
    usage: debusine-worker [-h] [--log-file LOG_FILE] [--log-level {DEBUG,INFO,WARNING,ERROR,CRITICAL}]
    
    Start Debusine worker process: ...

``debusine-worker`` is normally run automatically through a systemd
unit.

``debusine-worker`` expects ``sbin`` dirs in its ``PATH``, which is
normally the case when ran from systemd.

See also:

  * :ref:`set-up-debusine-worker`
  * :ref:`configure-manage-worker`


Command output
--------------

``debusine-worker`` is meant to be run as a daemon and normally
doesn't directly produce any output, but appends status information to
its log files.


Return values
-------------

Return values of the ``debusine-worker`` command:

===============  ==================================================================================
  Return value    Meaning
===============  ==================================================================================
 0                Success
 1                Error: unhandled exception. Please report the error
 2                Error: wrong arguments and options
 3                Error: any other type of error such as non-writable log file,

                  invalid configuration file, etc.
===============  ==================================================================================

Hooks
-----

It is possible to run a command after the worker completes a task, by
adding it to ``/etc/debusine/worker/hooks/after-work-request.d``. No
information about the task is available to the hook.