Skip to main content

Yaml interface for pgagent

Project description

pgagent-yaml - Yaml interface for pgagent

Export structure of pgagent jobs to yaml files
Sync yaml files to pgagent jobs

installation

pip install pgagent-yaml

usage

export jobs

usage: pgagent_yaml export [--help] [-d DBNAME] [-h HOST] [-p PORT] [-U USER] [-W PASSWORD] --out-dir OUT_DIR [--clean]
                           [--ignore-version] [--include-schedule-start-end]

options:
  --help                show this help message and exit
  -d DBNAME, --dbname DBNAME
                        database name to connect to
  -h HOST, --host HOST  database server host or socket directory
  -p PORT, --port PORT  database server port
  -U USER, --user USER  database user name
  -W PASSWORD, --password PASSWORD
                        database user password
  --out-dir OUT_DIR     directory for exporting files
  --clean               clean out_dir if not empty (env variable PGAGENT_YAML_AUTOCLEAN=true)
  --ignore-version      try to execute the command anyway
  --include-schedule-start-end
                        include "start", "end" fields (without by default)

print diff

usage: pgagent_yaml diff [--help] [-d DBNAME] [-h HOST] [-p PORT] [-U USER] [-W PASSWORD] --source SOURCE
                         [--ignore-version]

options:
  --help                show this help message and exit
  -d DBNAME, --dbname DBNAME
                        database name to connect to
  -h HOST, --host HOST  database server host or socket directory
  -p PORT, --port PORT  database server port
  -U USER, --user USER  database user name
  -W PASSWORD, --password PASSWORD
                        database user password
  --source SOURCE       directory or file with jobs to compare with pgagent
  --ignore-version      try to execute the command anyway

sync jobs

usage: pgagent_yaml sync [--help] [-d DBNAME] [-h HOST] [-p PORT] [-U USER] [-W PASSWORD] --source SOURCE [--dry-run]
                         [--echo-queries] [-y] [--ignore-version]

options:
  --help                show this help message and exit
  -d DBNAME, --dbname DBNAME
                        database name to connect to
  -h HOST, --host HOST  database server host or socket directory
  -p PORT, --port PORT  database server port
  -U USER, --user USER  database user name
  -W PASSWORD, --password PASSWORD
                        database user password
  --source SOURCE       directory or file with jobs to sync to pgagent
  --dry-run             test run without real changes
  --echo-queries        echo commands sent to server
  -y, --yes             do not ask confirm
  --ignore-version      try to execute the command anyway

run job now

usage: pgagent_yaml run_now [--help] [-d DBNAME] [-h HOST] [-p PORT] [-U USER] [-W PASSWORD] --job JOB_NAME
                            [--ignore-version]

options:
  --help                show this help message and exit
  -d DBNAME, --dbname DBNAME
                        database name to connect to
  -h HOST, --host HOST  database server host or socket directory
  -p PORT, --port PORT  database server port
  -U USER, --user USER  database user name
  -W PASSWORD, --password PASSWORD
                        database user password
  --job JOB_NAME        name of job to run
  --ignore-version      try to execute the command anyway

print job/step runs statistics

usage: pgagent_yaml stat [--help] [-d DBNAME] [-h HOST] [-p PORT] [-U USER] [-W PASSWORD] --job JOB_NAME [--step STEP_NAME]
                         [--start TIMESTAMP] [--till TIMESTAMP] [--limit ROWS] [--format {text,yaml}] [--ignore-version]

options:
  --help                show this help message and exit
  -d DBNAME, --dbname DBNAME
                        database name to connect to
  -h HOST, --host HOST  database server host or socket directory
  -p PORT, --port PORT  database server port
  -U USER, --user USER  database user name
  -W PASSWORD, --password PASSWORD
                        database user password
  --job JOB_NAME
  --step STEP_NAME
  --start TIMESTAMP     YYYY-MM-DD[ HH:MM:SS]
  --till TIMESTAMP      YYYY-MM-DD[ HH:MM:SS]
  --limit ROWS          (default: 50)
  --format {text,yaml}  (default: text)
  --ignore-version      try to execute the command anyway

examples

$ pgagent_yaml export -d my_database -h 127.0.0.1 -p 5432 -U postgres --out-dir /tmp/jobs/
$ pgagent_yaml diff -d my_database -h 127.0.0.1 -p 5432 -U postgres --source /tmp/jobs/
$ pgagent_yaml sync -d my_database -h 127.0.0.1 -p 5432 -U postgres --source /tmp/jobs/
$ pgagent_yaml run_now -d my_database -h 127.0.0.1 -p 5432 -U postgres --job my_job
$ pgagent_yaml stat -d my_database -h 127.0.0.1 -p 5432 -U postgres --job my_job --limit 10

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

pgagent_yaml-0.4.0.tar.gz (14.8 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

pgagent_yaml-0.4.0-py3-none-any.whl (16.2 kB view details)

Uploaded Python 3

File details

Details for the file pgagent_yaml-0.4.0.tar.gz.

File metadata

  • Download URL: pgagent_yaml-0.4.0.tar.gz
  • Upload date:
  • Size: 14.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.10.17

File hashes

Hashes for pgagent_yaml-0.4.0.tar.gz
Algorithm Hash digest
SHA256 0f5e1bb89065d71305a83221805979733a673740a941fccb28fe3793eda2816a
MD5 53672dd9f4c4f093e365cd7ef2d20a70
BLAKE2b-256 5501492bbd7490d5a4ece5a609eaf75540a3b2304343c70754bb6adff9e823d5

See more details on using hashes here.

File details

Details for the file pgagent_yaml-0.4.0-py3-none-any.whl.

File metadata

  • Download URL: pgagent_yaml-0.4.0-py3-none-any.whl
  • Upload date:
  • Size: 16.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.10.17

File hashes

Hashes for pgagent_yaml-0.4.0-py3-none-any.whl
Algorithm Hash digest
SHA256 7076a594fcd22c51173f667f5b45cc84d5468ebbb1991bfd5ad5005092959ad0
MD5 9d5338b6d8cc818c8ccc85cc31aeae57
BLAKE2b-256 aa3c4ec6698bb13cb20d5670a4953d222cbba93255c76db8de51e0068c9120df

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page