* add job list and update  job status command to mmctl
Этот коммит содержится в:
Ben Cooke
2024-06-17 12:07:05 -04:00
коммит произвёл GitHub
родитель 5894abc36e
Коммит 9187c772b6
38 изменённых файлов: 1423 добавлений и 101 удалений

Просмотреть файл

@@ -42,6 +42,7 @@ SEE ALSO
* `mmctl group <mmctl_group.rst>`_ - Management of groups
* `mmctl import <mmctl_import.rst>`_ - Management of imports
* `mmctl integrity <mmctl_integrity.rst>`_ - Check database records integrity.
* `mmctl job <mmctl_job.rst>`_ - Management of jobs
* `mmctl ldap <mmctl_ldap.rst>`_ - LDAP related utilities
* `mmctl license <mmctl_license.rst>`_ - Licensing commands
* `mmctl logs <mmctl_logs.rst>`_ - Display logs in a human-readable format

42
server/cmd/mmctl/docs/mmctl_job.rst Обычный файл
Просмотреть файл

@@ -0,0 +1,42 @@
.. _mmctl_job:
mmctl job
---------
Management of jobs
Synopsis
~~~~~~~~
Management of jobs
Options
~~~~~~~
::
-h, --help help for job
Options inherited from parent commands
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
::
--config string path to the configuration file (default "$XDG_CONFIG_HOME/mmctl/config")
--disable-pager disables paged output
--insecure-sha1-intermediate allows to use insecure TLS protocols, such as SHA-1
--insecure-tls-version allows to use TLS versions 1.0 and 1.1
--json the output format will be in json format
--local allows communicating with the server through a unix socket
--quiet prevent mmctl to generate output for the commands
--strict will only run commands if the mmctl version matches the server one
--suppress-warnings disables printing warning messages
SEE ALSO
~~~~~~~~
* `mmctl <mmctl.rst>`_ - Remote client for the Open Source, self-hosted Slack-alternative
* `mmctl job list <mmctl_job_list.rst>`_ - List the latest jobs
* `mmctl job update <mmctl_job_update.rst>`_ - Update the status of a job

60
server/cmd/mmctl/docs/mmctl_job_list.rst Обычный файл
Просмотреть файл

@@ -0,0 +1,60 @@
.. _mmctl_job_list:
mmctl job list
--------------
List the latest jobs
Synopsis
~~~~~~~~
List the latest jobs
::
mmctl job list [flags]
Examples
~~~~~~~~
::
job list
job list --ids jobID1,jobID2
job list --type ldap_sync --status success
job list --type ldap_sync --status success --page 0 --per-page 10
Options
~~~~~~~
::
--all Fetch all import jobs. --page flag will be ignored if provided
-h, --help help for list
--ids strings Comma-separated list of job IDs to which the operation will be applied. All other flags are ignored
--page int Page number to fetch for the list of import jobs
--per-page int Number of import jobs to be fetched (default 5)
--status string Filter by job status
--type string Filter by job type
Options inherited from parent commands
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
::
--config string path to the configuration file (default "$XDG_CONFIG_HOME/mmctl/config")
--disable-pager disables paged output
--insecure-sha1-intermediate allows to use insecure TLS protocols, such as SHA-1
--insecure-tls-version allows to use TLS versions 1.0 and 1.1
--json the output format will be in json format
--local allows communicating with the server through a unix socket
--quiet prevent mmctl to generate output for the commands
--strict will only run commands if the mmctl version matches the server one
--suppress-warnings disables printing warning messages
SEE ALSO
~~~~~~~~
* `mmctl job <mmctl_job.rst>`_ - Management of jobs

59
server/cmd/mmctl/docs/mmctl_job_update.rst Обычный файл
Просмотреть файл

@@ -0,0 +1,59 @@
.. _mmctl_job_update:
mmctl job update
----------------
Update the status of a job
Synopsis
~~~~~~~~
Update the status of a job. The following restrictions are in place:
- in_progress -> pending
- in_progress | pending -> cancel_requested
- cancel_requested -> canceled
Those restriction can be bypassed with --force=true but the only statuses you can go to are: pending, cancel_requested and canceled. This can have unexpected consequences and should be used with caution.
::
mmctl job update [job] [status] [flags]
Examples
~~~~~~~~
::
job update myJobID pending
job update myJobID pending --force true
job update myJobID canceled --force true
Options
~~~~~~~
::
--force Setting a job status is restricted to certain statuses. You can overwrite these restrictions by using --force. This might cause unexpected behaviour on your Mattermost Server. Use this option with caution.
-h, --help help for update
Options inherited from parent commands
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
::
--config string path to the configuration file (default "$XDG_CONFIG_HOME/mmctl/config")
--disable-pager disables paged output
--insecure-sha1-intermediate allows to use insecure TLS protocols, such as SHA-1
--insecure-tls-version allows to use TLS versions 1.0 and 1.1
--json the output format will be in json format
--local allows communicating with the server through a unix socket
--quiet prevent mmctl to generate output for the commands
--strict will only run commands if the mmctl version matches the server one
--suppress-warnings disables printing warning messages
SEE ALSO
~~~~~~~~
* `mmctl job <mmctl_job.rst>`_ - Management of jobs