doc/book/pyramid/ctl.rst
author Denis Laxalde <denis.laxalde@logilab.fr>
Mon, 06 Mar 2017 14:19:20 +0100
changeset 12008 7694dcf5ad30
parent 11631 faf279e33298
child 12521 cb68c985ee01
permissions -rw-r--r--
[etwist] Do not call repository's start_looping_tasks anymore and warn about this We are about to drop this method from Repository class and replace it by a blocking alternative. This is not compatible with how things currently work in a Twisted server implementation. So do not start repository "looping tasks" in Twisted server anymore and issue a warning about this. If someone is interested in restoring the "all-in-one" behavior where the repository runs within a Twisted server, they may start by implementing repository looping tasks using a Twisted mechanism such as, e.g., http://twistedmatrix.com/documents/current/core/howto/time.html and eventually provide the repository with a compatible scheduler instance so that is can register its periodic tasks. At the moment, we lack resources to do this (and maintain the Twisted server of CubicWeb in general). Related to #17057223.
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
11537
caf268942436 Initial documentation.
Christophe de Vienne <christophe@unlish.com>
parents:
diff changeset
     1
.. _cubicweb-ctl_pyramid:
caf268942436 Initial documentation.
Christophe de Vienne <christophe@unlish.com>
parents:
diff changeset
     2
caf268942436 Initial documentation.
Christophe de Vienne <christophe@unlish.com>
parents:
diff changeset
     3
The 'pyramid' command
caf268942436 Initial documentation.
Christophe de Vienne <christophe@unlish.com>
parents:
diff changeset
     4
=====================
caf268942436 Initial documentation.
Christophe de Vienne <christophe@unlish.com>
parents:
diff changeset
     5
caf268942436 Initial documentation.
Christophe de Vienne <christophe@unlish.com>
parents:
diff changeset
     6
.. program:: cubicweb-ctl pyramid
caf268942436 Initial documentation.
Christophe de Vienne <christophe@unlish.com>
parents:
diff changeset
     7
caf268942436 Initial documentation.
Christophe de Vienne <christophe@unlish.com>
parents:
diff changeset
     8
The 'pyramid' command is a replacement for the 'start' command of :ref:`cubicweb-ctl`.
caf268942436 Initial documentation.
Christophe de Vienne <christophe@unlish.com>
parents:
diff changeset
     9
It provides the same options and a few other ones.
caf268942436 Initial documentation.
Christophe de Vienne <christophe@unlish.com>
parents:
diff changeset
    10
caf268942436 Initial documentation.
Christophe de Vienne <christophe@unlish.com>
parents:
diff changeset
    11
.. note::
caf268942436 Initial documentation.
Christophe de Vienne <christophe@unlish.com>
parents:
diff changeset
    12
caf268942436 Initial documentation.
Christophe de Vienne <christophe@unlish.com>
parents:
diff changeset
    13
    The 'pyramid' command is provided by the ``pyramid`` cube.
caf268942436 Initial documentation.
Christophe de Vienne <christophe@unlish.com>
parents:
diff changeset
    14
caf268942436 Initial documentation.
Christophe de Vienne <christophe@unlish.com>
parents:
diff changeset
    15
Options
caf268942436 Initial documentation.
Christophe de Vienne <christophe@unlish.com>
parents:
diff changeset
    16
-------
caf268942436 Initial documentation.
Christophe de Vienne <christophe@unlish.com>
parents:
diff changeset
    17
caf268942436 Initial documentation.
Christophe de Vienne <christophe@unlish.com>
parents:
diff changeset
    18
caf268942436 Initial documentation.
Christophe de Vienne <christophe@unlish.com>
parents:
diff changeset
    19
.. option:: --no-daemon
caf268942436 Initial documentation.
Christophe de Vienne <christophe@unlish.com>
parents:
diff changeset
    20
caf268942436 Initial documentation.
Christophe de Vienne <christophe@unlish.com>
parents:
diff changeset
    21
    Run the server in the foreground.
caf268942436 Initial documentation.
Christophe de Vienne <christophe@unlish.com>
parents:
diff changeset
    22
caf268942436 Initial documentation.
Christophe de Vienne <christophe@unlish.com>
parents:
diff changeset
    23
.. option:: --debug-mode
caf268942436 Initial documentation.
Christophe de Vienne <christophe@unlish.com>
parents:
diff changeset
    24
caf268942436 Initial documentation.
Christophe de Vienne <christophe@unlish.com>
parents:
diff changeset
    25
    Activate the repository debug mode (logs in the console and the debug
11587
18dd303225cd [doc] Document embedding in a pyramid app
Christophe de Vienne <christophe@unlish.com>
parents: 11537
diff changeset
    26
    toolbar). Implies :option:`--no-daemon`.
18dd303225cd [doc] Document embedding in a pyramid app
Christophe de Vienne <christophe@unlish.com>
parents: 11537
diff changeset
    27
18dd303225cd [doc] Document embedding in a pyramid app
Christophe de Vienne <christophe@unlish.com>
parents: 11537
diff changeset
    28
    Also force the following pyramid options:
18dd303225cd [doc] Document embedding in a pyramid app
Christophe de Vienne <christophe@unlish.com>
parents: 11537
diff changeset
    29
18dd303225cd [doc] Document embedding in a pyramid app
Christophe de Vienne <christophe@unlish.com>
parents: 11537
diff changeset
    30
    .. code-block:: ini
18dd303225cd [doc] Document embedding in a pyramid app
Christophe de Vienne <christophe@unlish.com>
parents: 11537
diff changeset
    31
    
18dd303225cd [doc] Document embedding in a pyramid app
Christophe de Vienne <christophe@unlish.com>
parents: 11537
diff changeset
    32
        pyramid.debug_authorization = yes
18dd303225cd [doc] Document embedding in a pyramid app
Christophe de Vienne <christophe@unlish.com>
parents: 11537
diff changeset
    33
        pyramid.debug_notfound = yes
18dd303225cd [doc] Document embedding in a pyramid app
Christophe de Vienne <christophe@unlish.com>
parents: 11537
diff changeset
    34
        pyramid.debug_routematch = yes
18dd303225cd [doc] Document embedding in a pyramid app
Christophe de Vienne <christophe@unlish.com>
parents: 11537
diff changeset
    35
        pyramid.reload_templates = yes
11537
caf268942436 Initial documentation.
Christophe de Vienne <christophe@unlish.com>
parents:
diff changeset
    36
caf268942436 Initial documentation.
Christophe de Vienne <christophe@unlish.com>
parents:
diff changeset
    37
.. option:: -D, --debug
caf268942436 Initial documentation.
Christophe de Vienne <christophe@unlish.com>
parents:
diff changeset
    38
caf268942436 Initial documentation.
Christophe de Vienne <christophe@unlish.com>
parents:
diff changeset
    39
    Equals to :option:`--debug-mode` :option:`--no-daemon` :option:`--reload`
caf268942436 Initial documentation.
Christophe de Vienne <christophe@unlish.com>
parents:
diff changeset
    40
caf268942436 Initial documentation.
Christophe de Vienne <christophe@unlish.com>
parents:
diff changeset
    41
.. option:: --reload
caf268942436 Initial documentation.
Christophe de Vienne <christophe@unlish.com>
parents:
diff changeset
    42
caf268942436 Initial documentation.
Christophe de Vienne <christophe@unlish.com>
parents:
diff changeset
    43
    Restart the server if any source file is changed
caf268942436 Initial documentation.
Christophe de Vienne <christophe@unlish.com>
parents:
diff changeset
    44
caf268942436 Initial documentation.
Christophe de Vienne <christophe@unlish.com>
parents:
diff changeset
    45
.. option:: --reload-interval=RELOAD_INTERVAL
caf268942436 Initial documentation.
Christophe de Vienne <christophe@unlish.com>
parents:
diff changeset
    46
caf268942436 Initial documentation.
Christophe de Vienne <christophe@unlish.com>
parents:
diff changeset
    47
    Interval, in seconds, between file modifications checks [current: 1]
caf268942436 Initial documentation.
Christophe de Vienne <christophe@unlish.com>
parents:
diff changeset
    48
caf268942436 Initial documentation.
Christophe de Vienne <christophe@unlish.com>
parents:
diff changeset
    49
.. option:: -l <log level>, --loglevel=<log level>
caf268942436 Initial documentation.
Christophe de Vienne <christophe@unlish.com>
parents:
diff changeset
    50
caf268942436 Initial documentation.
Christophe de Vienne <christophe@unlish.com>
parents:
diff changeset
    51
    Set the loglevel. debug if -D is set, error otherwise
caf268942436 Initial documentation.
Christophe de Vienne <christophe@unlish.com>
parents:
diff changeset
    52
caf268942436 Initial documentation.
Christophe de Vienne <christophe@unlish.com>
parents:
diff changeset
    53
.. option:: -p, --profile
caf268942436 Initial documentation.
Christophe de Vienne <christophe@unlish.com>
parents:
diff changeset
    54
caf268942436 Initial documentation.
Christophe de Vienne <christophe@unlish.com>
parents:
diff changeset
    55
    Enable profiling. See :ref:`profiling`.
caf268942436 Initial documentation.
Christophe de Vienne <christophe@unlish.com>
parents:
diff changeset
    56
caf268942436 Initial documentation.
Christophe de Vienne <christophe@unlish.com>
parents:
diff changeset
    57
.. option:: --profile-output=PROFILE_OUTPUT
caf268942436 Initial documentation.
Christophe de Vienne <christophe@unlish.com>
parents:
diff changeset
    58
caf268942436 Initial documentation.
Christophe de Vienne <christophe@unlish.com>
parents:
diff changeset
    59
    Profiling output file (default: "program.prof")
caf268942436 Initial documentation.
Christophe de Vienne <christophe@unlish.com>
parents:
diff changeset
    60
caf268942436 Initial documentation.
Christophe de Vienne <christophe@unlish.com>
parents:
diff changeset
    61
.. option:: --profile-dump-every=N
caf268942436 Initial documentation.
Christophe de Vienne <christophe@unlish.com>
parents:
diff changeset
    62
caf268942436 Initial documentation.
Christophe de Vienne <christophe@unlish.com>
parents:
diff changeset
    63
    Dump profile stats to ouput every N requests (default: 100)