Skip to content
Snippets Groups Projects
Commit 35dc5185 authored by Honza Mach's avatar Honza Mach
Browse files

Improved application configuration documentation page.

parent ab673846
No related branches found
No related tags found
No related merge requests found
``--help``
Display help and usage description and exit (*flag*)
Display help and usage description and exit (*flag*).
``--name alternative-name``
Alternative name for application instead of default ``$0``, using which names
for log, runlog, pid, status and other files will be generated.
``--debug``
Run in debug mode (*flag*).
*Type:* ``string``, *default:* ``$0``
Input various status information to ``stderr``.
*Type:* ``boolean``, *default:* ``False``
``--quiet``
Run in quiet mode (*flag*).
......@@ -19,6 +20,34 @@
*Type:* ``boolean``, *default:* ``False``
``--name alternative-name``
Alternative name for application instead of default ``$0``.
This value will be used to generate names for log, runlog, pid, status and
other application files.
*Type:* ``string``, *default:* ``$0``
``--config-file file-name``
Name of the configuration file.
*Type:* ``string``, *default:* autodetected
``--config-file-silent``
Do not complain in case given configuration file does not exist (*flag*).
*Type:* ``boolean``, *default:* ``False``
``--config-dir file-name``
Name of the configuration directory.
*Type:* ``string``, *default:* autodetected
``--config-file-silent``
Do not complain in case given configuration directory does not exist (*flag*).
*Type:* ``boolean``, *default:* ``False``
``--log-file file-name``
Name of the log file.
......@@ -39,22 +68,22 @@
*Type:* ``boolean``, *default:* ``False``
``--runlog_log``
``--runlog-log``
Write runlog to logging service when done processing (*flag*)
*Type:* ``boolean``, *default:* ``False``
``--pstate_file file-name``
``--pstate-file file-name``
Name of the persistent state file.
*Type:* ``string``, *default:* autodetected
``--pstate_dump``
``--pstate-dump``
Dump persistent state to stdout when done processing (*flag*).
*Type:* ``boolean``, *default:* ``False``
``--pstate_log``
``--pstate-log``
Write persistent state to logging service when done processing (*flag*).
*Type:* ``boolean``, *default:* ``False``
......
......@@ -8,17 +8,17 @@
*Type:* ``string``, *default:* ``None``
``--work_dir dir-name``
``--work-dir dir-name``
Name of the process work directory.
*Type:* ``string``, *default:* ``/``
``--pid_file file-name``
``--pid-file file-name``
Name of the pid file.
*Type:* ``string``, *default:* autodetected
``--state_file file-name``
``--state-file file-name``
Name of the state file.
*Type:* ``string``, *default:* autodetected
......
``--regular``
Operational mode: regular script execution (*flag*). Conflicts with ``--shell`` option.
Operational mode: regular script execution (*flag*).
Conflicts with ``--shell`` option.
*Type:* ``boolean``, *default:* ``False``
``--shell``
Operational mode: manual script execution from shell (*flag*). Conflicts with ``--regular`` option.
Operational mode: manual script execution from shell (*flag*).
Conflicts with ``--regular`` option.
*Type:* ``boolean``, *default:* ``False``
......@@ -18,12 +22,12 @@
*Type:* ``string``, *default:* ``daily``
``--adjust_thresholds``
``--adjust-thresholds``
Round-up time interval threshols to interval size (*flag*).
*Type:* ``boolean``, *default:* ``False``
``--time_high time``
``--time-high time``
Upper time interval threshold.
*Type:* ``float``, *default:* time.time
......@@ -17,20 +17,22 @@ particular order, so the value given by command line option overwrites the value
written in configuration file.
Command line options
Command line parameters
--------------------------------------------------------------------------------
Configuration can be passed down to application by command line options. These options
have the highest priority and will overwrite any other configuration values. Depending
on the base object of the application different set of options is available.
Common application options
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Following configuration options are available for all applications based on
:py:mod:`pyzenkit.baseapp`:
.. include:: _inc_bin.cfg-app.rst
.. include:: _inc_bin.cfg_cli_app.rst
Common script options
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
......@@ -38,24 +40,29 @@ Common script options
Following configuration options are available on top of common applicationsoptions
for all applications based on :py:mod:`pyzenkit.zenscript`:
.. include:: _inc_bin.cfg-script.rst
.. include:: _inc_bin.cfg_cli_script.rst
Common daemon options
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Following configuration options are available on top of common applicationsoptions
Following configuration options are available on top of common application options
for all applications based on :py:mod:`pyzenkit.zendaemon`:
.. include:: _inc_bin.cfg-daemon.rst
.. include:: _inc_bin.cfg_cli_daemon.rst
Configuration files and directories
--------------------------------------------------------------------------------
Configuration can be passed down to application using a combination of configuration
file or configuration directory. The configuration file
Configurations can be passed down to application using a combination of configuration
file or configuration directory. Values from configuration files override the values
from configuration directories. Configuration directories can therefore be used to
define common or default configuration values and those can be overriden when
necessary for given application component.
The available configuration keys are very similar to command line options and the
names differ only in the use of ``_`` character instead of ``-``. However there is
a certain set of configuration keys that is available only through command line
options and not through configuration file and vice versa.
......@@ -5,6 +5,9 @@ Framework overview
The whole framework is broken down into following submodules:
:py:mod:`pyzenkit.utils`
Module containing various useful utilities.
:py:mod:`pyzenkit.jsonconf`
Module for handling JSON based configuration files and directories.
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment