Browse Source

Update CLI docs

Matt Robenolt 8 years ago
parent
commit
78c017beb2

+ 1 - 0
docs/cli/devserver/index.rst

@@ -12,4 +12,5 @@ Options
 - ``--workers / --no-workers``: Run asynchronous workers.
 - ``-l, --loglevel [DEBUG|INFO|WARNING|ERROR|CRITICAL|FATAL]``: Global
   logging level. Use wisely.
+- ``--logformat [human|machine]``: Log line format.
 - ``--help``: print this help page.

+ 28 - 0
docs/cli/exec/index.rst

@@ -0,0 +1,28 @@
+`sentry exec [FILE]`
+--------------------
+
+Execute a script.
+
+Also compatible with hashbang `#!/usr/bin/env sentry exec`
+
+For convenience, the following preample is attached to scripts:
+
+
+  from sentry.runner import configure; configure()
+  from django.conf import settings
+  from sentry.models import *
+
+Examples:
+
+
+  $ sentry exec -c 'print(Project.objects.count())'
+  $ echo 'print(Project.objects.count())' | sentry exec
+  $ sentry exec something.py
+
+Note: All scripts are assumed utf-8.
+
+Options
+```````
+
+- ``-c TEXT``: Read script from string.
+- ``--help``: print this help page.

+ 1 - 0
docs/cli/index.rst.inc

@@ -26,6 +26,7 @@ Subcommands
  upgrade <upgrade/index>
  run <run/index>
  help <help/index>
+ exec <exec/index>
  queues <queues/index>
  plugins <plugins/index>
  devserver <devserver/index>

+ 1 - 0
docs/cli/run/cron/index.rst

@@ -16,4 +16,5 @@ Options
 - ``--autoreload``: Enable autoreloading.
 - ``-l, --loglevel [DEBUG|INFO|WARNING|ERROR|CRITICAL|FATAL]``: Global
   logging level. Use wisely.
+- ``--logformat [human|machine]``: Log line format.
 - ``--help``: print this help page.

+ 2 - 0
docs/cli/run/web/index.rst

@@ -10,7 +10,9 @@ Options
 - ``-w, --workers INTEGER``: The number of worker processes for handling
   requests.
 - ``--upgrade``: Upgrade before starting.
+- ``--with-lock``: Use a lock if performing an upgrade.
 - ``--noinput``: Do not prompt the user for input of any kind.
 - ``-l, --loglevel [DEBUG|INFO|WARNING|ERROR|CRITICAL|FATAL]``: Global
   logging level. Use wisely.
+- ``--logformat [human|machine]``: Log line format.
 - ``--help``: print this help page.

+ 1 - 0
docs/cli/run/worker/index.rst

@@ -21,4 +21,5 @@ Options
 - ``--autoreload``: Enable autoreloading.
 - ``-l, --loglevel [DEBUG|INFO|WARNING|ERROR|CRITICAL|FATAL]``: Global
   logging level. Use wisely.
+- ``--logformat [human|machine]``: Log line format.
 - ``--help``: print this help page.

+ 1 - 0
docs/cli/upgrade/index.rst

@@ -9,4 +9,5 @@ Options
 - ``-v, --verbosity INTEGER``: Verbosity level.
 - ``--traceback``: Raise on exception.
 - ``--noinput``: Do not prompt the user for input of any kind.
+- ``--lock``: Hold a global lock and limit upgrade to one concurrent.
 - ``--help``: print this help page.