hypershell 2.9.0a2__tar.gz → 2.9.0a3__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {hypershell-2.9.0a2 → hypershell-2.9.0a3}/PKG-INFO +1 -1
- {hypershell-2.9.0a2 → hypershell-2.9.0a3}/docs/_include/client_help.rst +2 -0
- {hypershell-2.9.0a2 → hypershell-2.9.0a3}/docs/_include/config_param_ref.rst +12 -2
- hypershell-2.9.0a3/docs/_include/database.rst +412 -0
- {hypershell-2.9.0a2 → hypershell-2.9.0a3}/docs/_include/database_alt.rst +6 -0
- {hypershell-2.9.0a2 → hypershell-2.9.0a3}/docs/_include/task_groups_alt.rst +9 -0
- {hypershell-2.9.0a2 → hypershell-2.9.0a3}/docs/install.rst +2 -0
- {hypershell-2.9.0a2 → hypershell-2.9.0a3}/pyproject.toml +1 -1
- {hypershell-2.9.0a2 → hypershell-2.9.0a3}/share/man/man1/hs.1 +30 -3
- {hypershell-2.9.0a2 → hypershell-2.9.0a3}/share/man/man1/hsx.1 +30 -3
- {hypershell-2.9.0a2 → hypershell-2.9.0a3}/share/man/man1/hyper-shell.1 +30 -3
- {hypershell-2.9.0a2 → hypershell-2.9.0a3}/src/hypershell/client.py +1 -0
- {hypershell-2.9.0a2 → hypershell-2.9.0a3}/src/hypershell/cluster/local.py +1 -0
- {hypershell-2.9.0a2 → hypershell-2.9.0a3}/src/hypershell/cluster/remote.py +5 -2
- {hypershell-2.9.0a2 → hypershell-2.9.0a3}/src/hypershell/cluster/ssh.py +2 -1
- {hypershell-2.9.0a2 → hypershell-2.9.0a3}/src/hypershell/core/queue.py +6 -1
- {hypershell-2.9.0a2 → hypershell-2.9.0a3}/src/hypershell/data/__init__.py +25 -2
- {hypershell-2.9.0a2 → hypershell-2.9.0a3}/src/hypershell/data/core.py +8 -7
- {hypershell-2.9.0a2 → hypershell-2.9.0a3}/src/hypershell/data/model.py +230 -35
- hypershell-2.9.0a3/src/hypershell/data/timescale.py +636 -0
- {hypershell-2.9.0a2 → hypershell-2.9.0a3}/src/hypershell/server.py +144 -15
- {hypershell-2.9.0a2 → hypershell-2.9.0a3}/tests/conftest.py +36 -2
- {hypershell-2.9.0a2 → hypershell-2.9.0a3}/tests/fixtures/make-legacy-postgres.sh +31 -0
- hypershell-2.9.0a3/tests/test_contended_recovery.py +485 -0
- hypershell-2.9.0a3/tests/test_contended_write.py +303 -0
- hypershell-2.9.0a3/tests/test_group_order.py +470 -0
- hypershell-2.9.0a3/tests/test_queue_address_family.py +461 -0
- hypershell-2.9.0a3/tests/test_timescale.py +1086 -0
- hypershell-2.9.0a3/tests/test_writeback.py +506 -0
- hypershell-2.9.0a3/tests/test_writeback_postgres.py +240 -0
- hypershell-2.9.0a3/tests/test_writeback_statement.py +290 -0
- {hypershell-2.9.0a2 → hypershell-2.9.0a3}/uv.lock +1 -1
- hypershell-2.9.0a2/docs/_include/database.rst +0 -128
- {hypershell-2.9.0a2 → hypershell-2.9.0a3}/.gitignore +0 -0
- {hypershell-2.9.0a2 → hypershell-2.9.0a3}/CODE_OF_CONDUCT.md +0 -0
- {hypershell-2.9.0a2 → hypershell-2.9.0a3}/LICENSE +0 -0
- {hypershell-2.9.0a2 → hypershell-2.9.0a3}/README.rst +0 -0
- {hypershell-2.9.0a2 → hypershell-2.9.0a3}/docs/Makefile +0 -0
- {hypershell-2.9.0a2 → hypershell-2.9.0a3}/docs/_include/citation.rst +0 -0
- {hypershell-2.9.0a2 → hypershell-2.9.0a3}/docs/_include/client_desc.rst +0 -0
- {hypershell-2.9.0a2 → hypershell-2.9.0a3}/docs/_include/client_usage.rst +0 -0
- {hypershell-2.9.0a2 → hypershell-2.9.0a3}/docs/_include/cluster_desc.rst +0 -0
- {hypershell-2.9.0a2 → hypershell-2.9.0a3}/docs/_include/cluster_help.rst +0 -0
- {hypershell-2.9.0a2 → hypershell-2.9.0a3}/docs/_include/cluster_usage.rst +0 -0
- {hypershell-2.9.0a2 → hypershell-2.9.0a3}/docs/_include/config_desc.rst +0 -0
- {hypershell-2.9.0a2 → hypershell-2.9.0a3}/docs/_include/config_edit_desc.rst +0 -0
- {hypershell-2.9.0a2 → hypershell-2.9.0a3}/docs/_include/config_edit_help.rst +0 -0
- {hypershell-2.9.0a2 → hypershell-2.9.0a3}/docs/_include/config_edit_usage.rst +0 -0
- {hypershell-2.9.0a2 → hypershell-2.9.0a3}/docs/_include/config_get_desc.rst +0 -0
- {hypershell-2.9.0a2 → hypershell-2.9.0a3}/docs/_include/config_get_help.rst +0 -0
- {hypershell-2.9.0a2 → hypershell-2.9.0a3}/docs/_include/config_get_usage.rst +0 -0
- {hypershell-2.9.0a2 → hypershell-2.9.0a3}/docs/_include/config_help.rst +0 -0
- {hypershell-2.9.0a2 → hypershell-2.9.0a3}/docs/_include/config_intro.rst +0 -0
- {hypershell-2.9.0a2 → hypershell-2.9.0a3}/docs/_include/config_intro_alt.rst +0 -0
- {hypershell-2.9.0a2 → hypershell-2.9.0a3}/docs/_include/config_pythonpath.rst +0 -0
- {hypershell-2.9.0a2 → hypershell-2.9.0a3}/docs/_include/config_set_desc.rst +0 -0
- {hypershell-2.9.0a2 → hypershell-2.9.0a3}/docs/_include/config_set_help.rst +0 -0
- {hypershell-2.9.0a2 → hypershell-2.9.0a3}/docs/_include/config_set_usage.rst +0 -0
- {hypershell-2.9.0a2 → hypershell-2.9.0a3}/docs/_include/config_site_vars.rst +0 -0
- {hypershell-2.9.0a2 → hypershell-2.9.0a3}/docs/_include/config_task_env.rst +0 -0
- {hypershell-2.9.0a2 → hypershell-2.9.0a3}/docs/_include/config_task_env_alt.rst +0 -0
- {hypershell-2.9.0a2 → hypershell-2.9.0a3}/docs/_include/config_usage.rst +0 -0
- {hypershell-2.9.0a2 → hypershell-2.9.0a3}/docs/_include/config_which_desc.rst +0 -0
- {hypershell-2.9.0a2 → hypershell-2.9.0a3}/docs/_include/config_which_help.rst +0 -0
- {hypershell-2.9.0a2 → hypershell-2.9.0a3}/docs/_include/config_which_usage.rst +0 -0
- {hypershell-2.9.0a2 → hypershell-2.9.0a3}/docs/_include/desc.rst +0 -0
- {hypershell-2.9.0a2 → hypershell-2.9.0a3}/docs/_include/exit_status.rst +0 -0
- {hypershell-2.9.0a2 → hypershell-2.9.0a3}/docs/_include/initdb_desc.rst +0 -0
- {hypershell-2.9.0a2 → hypershell-2.9.0a3}/docs/_include/initdb_help.rst +0 -0
- {hypershell-2.9.0a2 → hypershell-2.9.0a3}/docs/_include/initdb_usage.rst +0 -0
- {hypershell-2.9.0a2 → hypershell-2.9.0a3}/docs/_include/license.rst +0 -0
- {hypershell-2.9.0a2 → hypershell-2.9.0a3}/docs/_include/security_alt.rst +0 -0
- {hypershell-2.9.0a2 → hypershell-2.9.0a3}/docs/_include/server_desc.rst +0 -0
- {hypershell-2.9.0a2 → hypershell-2.9.0a3}/docs/_include/server_help.rst +0 -0
- {hypershell-2.9.0a2 → hypershell-2.9.0a3}/docs/_include/server_usage.rst +0 -0
- {hypershell-2.9.0a2 → hypershell-2.9.0a3}/docs/_include/signals.rst +0 -0
- {hypershell-2.9.0a2 → hypershell-2.9.0a3}/docs/_include/submit_desc.rst +0 -0
- {hypershell-2.9.0a2 → hypershell-2.9.0a3}/docs/_include/submit_help.rst +0 -0
- {hypershell-2.9.0a2 → hypershell-2.9.0a3}/docs/_include/submit_usage.rst +0 -0
- {hypershell-2.9.0a2 → hypershell-2.9.0a3}/docs/_include/task_info_desc.rst +0 -0
- {hypershell-2.9.0a2 → hypershell-2.9.0a3}/docs/_include/task_info_help.rst +0 -0
- {hypershell-2.9.0a2 → hypershell-2.9.0a3}/docs/_include/task_info_usage.rst +0 -0
- {hypershell-2.9.0a2 → hypershell-2.9.0a3}/docs/_include/task_run_desc.rst +0 -0
- {hypershell-2.9.0a2 → hypershell-2.9.0a3}/docs/_include/task_run_help.rst +0 -0
- {hypershell-2.9.0a2 → hypershell-2.9.0a3}/docs/_include/task_run_usage.rst +0 -0
- {hypershell-2.9.0a2 → hypershell-2.9.0a3}/docs/_include/task_search_desc.rst +0 -0
- {hypershell-2.9.0a2 → hypershell-2.9.0a3}/docs/_include/task_search_help.rst +0 -0
- {hypershell-2.9.0a2 → hypershell-2.9.0a3}/docs/_include/task_search_usage.rst +0 -0
- {hypershell-2.9.0a2 → hypershell-2.9.0a3}/docs/_include/task_submit_desc.rst +0 -0
- {hypershell-2.9.0a2 → hypershell-2.9.0a3}/docs/_include/task_submit_help.rst +0 -0
- {hypershell-2.9.0a2 → hypershell-2.9.0a3}/docs/_include/task_submit_usage.rst +0 -0
- {hypershell-2.9.0a2 → hypershell-2.9.0a3}/docs/_include/task_update_desc.rst +0 -0
- {hypershell-2.9.0a2 → hypershell-2.9.0a3}/docs/_include/task_update_help.rst +0 -0
- {hypershell-2.9.0a2 → hypershell-2.9.0a3}/docs/_include/task_update_usage.rst +0 -0
- {hypershell-2.9.0a2 → hypershell-2.9.0a3}/docs/_include/task_wait_desc.rst +0 -0
- {hypershell-2.9.0a2 → hypershell-2.9.0a3}/docs/_include/task_wait_help.rst +0 -0
- {hypershell-2.9.0a2 → hypershell-2.9.0a3}/docs/_include/task_wait_usage.rst +0 -0
- {hypershell-2.9.0a2 → hypershell-2.9.0a3}/docs/_include/templates.rst +0 -0
- {hypershell-2.9.0a2 → hypershell-2.9.0a3}/docs/_include/templates_alt.rst +0 -0
- {hypershell-2.9.0a2 → hypershell-2.9.0a3}/docs/_include/tls_cli_options.rst +0 -0
- {hypershell-2.9.0a2 → hypershell-2.9.0a3}/docs/_static/custom.css +0 -0
- {hypershell-2.9.0a2 → hypershell-2.9.0a3}/docs/_static/logo-dark-mode.png +0 -0
- {hypershell-2.9.0a2 → hypershell-2.9.0a3}/docs/_static/logo-light-mode.png +0 -0
- {hypershell-2.9.0a2 → hypershell-2.9.0a3}/docs/alternatives.rst +0 -0
- {hypershell-2.9.0a2 → hypershell-2.9.0a3}/docs/api/client.rst +0 -0
- {hypershell-2.9.0a2 → hypershell-2.9.0a3}/docs/api/cluster.rst +0 -0
- {hypershell-2.9.0a2 → hypershell-2.9.0a3}/docs/api/data.rst +0 -0
- {hypershell-2.9.0a2 → hypershell-2.9.0a3}/docs/api/index.rst +0 -0
- {hypershell-2.9.0a2 → hypershell-2.9.0a3}/docs/api/server.rst +0 -0
- {hypershell-2.9.0a2 → hypershell-2.9.0a3}/docs/api/submit.rst +0 -0
- {hypershell-2.9.0a2 → hypershell-2.9.0a3}/docs/cli/client.rst +0 -0
- {hypershell-2.9.0a2 → hypershell-2.9.0a3}/docs/cli/cluster.rst +0 -0
- {hypershell-2.9.0a2 → hypershell-2.9.0a3}/docs/cli/config.rst +0 -0
- {hypershell-2.9.0a2 → hypershell-2.9.0a3}/docs/cli/config_edit.rst +0 -0
- {hypershell-2.9.0a2 → hypershell-2.9.0a3}/docs/cli/config_get.rst +0 -0
- {hypershell-2.9.0a2 → hypershell-2.9.0a3}/docs/cli/config_set.rst +0 -0
- {hypershell-2.9.0a2 → hypershell-2.9.0a3}/docs/cli/config_which.rst +0 -0
- {hypershell-2.9.0a2 → hypershell-2.9.0a3}/docs/cli/index.rst +0 -0
- {hypershell-2.9.0a2 → hypershell-2.9.0a3}/docs/cli/initdb.rst +0 -0
- {hypershell-2.9.0a2 → hypershell-2.9.0a3}/docs/cli/server.rst +0 -0
- {hypershell-2.9.0a2 → hypershell-2.9.0a3}/docs/cli/submit.rst +0 -0
- {hypershell-2.9.0a2 → hypershell-2.9.0a3}/docs/cli/task_info.rst +0 -0
- {hypershell-2.9.0a2 → hypershell-2.9.0a3}/docs/cli/task_run.rst +0 -0
- {hypershell-2.9.0a2 → hypershell-2.9.0a3}/docs/cli/task_search.rst +0 -0
- {hypershell-2.9.0a2 → hypershell-2.9.0a3}/docs/cli/task_submit.rst +0 -0
- {hypershell-2.9.0a2 → hypershell-2.9.0a3}/docs/cli/task_update.rst +0 -0
- {hypershell-2.9.0a2 → hypershell-2.9.0a3}/docs/cli/task_wait.rst +0 -0
- {hypershell-2.9.0a2 → hypershell-2.9.0a3}/docs/conf.py +0 -0
- {hypershell-2.9.0a2 → hypershell-2.9.0a3}/docs/config.rst +0 -0
- {hypershell-2.9.0a2 → hypershell-2.9.0a3}/docs/database.rst +0 -0
- {hypershell-2.9.0a2 → hypershell-2.9.0a3}/docs/getting_started.rst +0 -0
- {hypershell-2.9.0a2 → hypershell-2.9.0a3}/docs/index.rst +0 -0
- {hypershell-2.9.0a2 → hypershell-2.9.0a3}/docs/logging.rst +0 -0
- {hypershell-2.9.0a2 → hypershell-2.9.0a3}/docs/manual.rst +0 -0
- {hypershell-2.9.0a2 → hypershell-2.9.0a3}/docs/security.rst +0 -0
- {hypershell-2.9.0a2 → hypershell-2.9.0a3}/docs/templates.rst +0 -0
- {hypershell-2.9.0a2 → hypershell-2.9.0a3}/share/bash_completion.d/hs +0 -0
- {hypershell-2.9.0a2 → hypershell-2.9.0a3}/share/bash_completion.d/hsx +0 -0
- {hypershell-2.9.0a2 → hypershell-2.9.0a3}/share/zsh/site-functions/_hs +0 -0
- {hypershell-2.9.0a2 → hypershell-2.9.0a3}/src/hypershell/__init__.py +0 -0
- {hypershell-2.9.0a2 → hypershell-2.9.0a3}/src/hypershell/cluster/__init__.py +0 -0
- {hypershell-2.9.0a2 → hypershell-2.9.0a3}/src/hypershell/config.py +0 -0
- {hypershell-2.9.0a2 → hypershell-2.9.0a3}/src/hypershell/core/__init__.py +0 -0
- {hypershell-2.9.0a2 → hypershell-2.9.0a3}/src/hypershell/core/config.py +0 -0
- {hypershell-2.9.0a2 → hypershell-2.9.0a3}/src/hypershell/core/exceptions.py +0 -0
- {hypershell-2.9.0a2 → hypershell-2.9.0a3}/src/hypershell/core/fsm.py +0 -0
- {hypershell-2.9.0a2 → hypershell-2.9.0a3}/src/hypershell/core/heartbeat.py +0 -0
- {hypershell-2.9.0a2 → hypershell-2.9.0a3}/src/hypershell/core/logging.py +0 -0
- {hypershell-2.9.0a2 → hypershell-2.9.0a3}/src/hypershell/core/platform.py +0 -0
- {hypershell-2.9.0a2 → hypershell-2.9.0a3}/src/hypershell/core/pretty_print.py +0 -0
- {hypershell-2.9.0a2 → hypershell-2.9.0a3}/src/hypershell/core/remote.py +0 -0
- {hypershell-2.9.0a2 → hypershell-2.9.0a3}/src/hypershell/core/resource.py +0 -0
- {hypershell-2.9.0a2 → hypershell-2.9.0a3}/src/hypershell/core/signal.py +0 -0
- {hypershell-2.9.0a2 → hypershell-2.9.0a3}/src/hypershell/core/sys.py +0 -0
- {hypershell-2.9.0a2 → hypershell-2.9.0a3}/src/hypershell/core/tag.py +0 -0
- {hypershell-2.9.0a2 → hypershell-2.9.0a3}/src/hypershell/core/template.py +0 -0
- {hypershell-2.9.0a2 → hypershell-2.9.0a3}/src/hypershell/core/thread.py +0 -0
- {hypershell-2.9.0a2 → hypershell-2.9.0a3}/src/hypershell/core/tls.py +0 -0
- {hypershell-2.9.0a2 → hypershell-2.9.0a3}/src/hypershell/core/types.py +0 -0
- {hypershell-2.9.0a2 → hypershell-2.9.0a3}/src/hypershell/core/uuid.py +0 -0
- {hypershell-2.9.0a2 → hypershell-2.9.0a3}/src/hypershell/data/upgrade.py +0 -0
- {hypershell-2.9.0a2 → hypershell-2.9.0a3}/src/hypershell/submit.py +0 -0
- {hypershell-2.9.0a2 → hypershell-2.9.0a3}/src/hypershell/task.py +0 -0
- {hypershell-2.9.0a2 → hypershell-2.9.0a3}/tests/__init__.py +0 -0
- {hypershell-2.9.0a2 → hypershell-2.9.0a3}/tests/fixtures/README.md +0 -0
- {hypershell-2.9.0a2 → hypershell-2.9.0a3}/tests/fixtures/hypershell-2.8.3.db +0 -0
- {hypershell-2.9.0a2 → hypershell-2.9.0a3}/tests/fixtures/make-2.8.3-db.sh +0 -0
- {hypershell-2.9.0a2 → hypershell-2.9.0a3}/tests/test_autoscale.py +0 -0
- {hypershell-2.9.0a2 → hypershell-2.9.0a3}/tests/test_cancel.py +0 -0
- {hypershell-2.9.0a2 → hypershell-2.9.0a3}/tests/test_card_info.py +0 -0
- {hypershell-2.9.0a2 → hypershell-2.9.0a3}/tests/test_card_integration.py +0 -0
- {hypershell-2.9.0a2 → hypershell-2.9.0a3}/tests/test_card_render.py +0 -0
- {hypershell-2.9.0a2 → hypershell-2.9.0a3}/tests/test_client.py +0 -0
- {hypershell-2.9.0a2 → hypershell-2.9.0a3}/tests/test_cluster.py +0 -0
- {hypershell-2.9.0a2 → hypershell-2.9.0a3}/tests/test_completions.py +0 -0
- {hypershell-2.9.0a2 → hypershell-2.9.0a3}/tests/test_data/__init__.py +0 -0
- {hypershell-2.9.0a2 → hypershell-2.9.0a3}/tests/test_data/test_core.py +0 -0
- {hypershell-2.9.0a2 → hypershell-2.9.0a3}/tests/test_data/test_model.py +0 -0
- {hypershell-2.9.0a2 → hypershell-2.9.0a3}/tests/test_data/test_upgrade.py +0 -0
- {hypershell-2.9.0a2 → hypershell-2.9.0a3}/tests/test_factory_fsm.py +0 -0
- {hypershell-2.9.0a2 → hypershell-2.9.0a3}/tests/test_groups.py +0 -0
- {hypershell-2.9.0a2 → hypershell-2.9.0a3}/tests/test_initdb.py +0 -0
- {hypershell-2.9.0a2 → hypershell-2.9.0a3}/tests/test_list.py +0 -0
- {hypershell-2.9.0a2 → hypershell-2.9.0a3}/tests/test_logging.py +0 -0
- {hypershell-2.9.0a2 → hypershell-2.9.0a3}/tests/test_main.py +0 -0
- {hypershell-2.9.0a2 → hypershell-2.9.0a3}/tests/test_meta_status.py +0 -0
- {hypershell-2.9.0a2 → hypershell-2.9.0a3}/tests/test_queue_tls.py +0 -0
- {hypershell-2.9.0a2 → hypershell-2.9.0a3}/tests/test_restart.py +0 -0
- {hypershell-2.9.0a2 → hypershell-2.9.0a3}/tests/test_retry_gate.py +0 -0
- {hypershell-2.9.0a2 → hypershell-2.9.0a3}/tests/test_server.py +0 -0
- {hypershell-2.9.0a2 → hypershell-2.9.0a3}/tests/test_signal.py +0 -0
- {hypershell-2.9.0a2 → hypershell-2.9.0a3}/tests/test_source.py +0 -0
- {hypershell-2.9.0a2 → hypershell-2.9.0a3}/tests/test_status_label.py +0 -0
- {hypershell-2.9.0a2 → hypershell-2.9.0a3}/tests/test_submit.py +0 -0
- {hypershell-2.9.0a2 → hypershell-2.9.0a3}/tests/test_submit_json.py +0 -0
- {hypershell-2.9.0a2 → hypershell-2.9.0a3}/tests/test_template.py +0 -0
- {hypershell-2.9.0a2 → hypershell-2.9.0a3}/tests/test_update.py +0 -0
- {hypershell-2.9.0a2 → hypershell-2.9.0a3}/tests/test_upgrade_cli.py +0 -0
- {hypershell-2.9.0a2 → hypershell-2.9.0a3}/tests/test_upgrade_postgres.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.5
|
|
2
2
|
Name: hypershell
|
|
3
|
-
Version: 2.9.
|
|
3
|
+
Version: 2.9.0a3
|
|
4
4
|
Summary: A cross-platform, high-throughput computing utility for processing shell commands over a distributed, asynchronous queue.
|
|
5
5
|
Project-URL: Homepage, https://hypershell.org
|
|
6
6
|
Project-URL: Documentation, https://hypershell.readthedocs.io
|
|
@@ -88,6 +88,8 @@ Options
|
|
|
88
88
|
Timeout in seconds for client. Automatically shutdown if no tasks received (default: never).
|
|
89
89
|
|
|
90
90
|
This feature allows for gracefully scaling down a cluster when task throughput subsides.
|
|
91
|
+
The timeout counts from when the client starts, after any ``--delay-start``, so the delay
|
|
92
|
+
does not count toward it.
|
|
91
93
|
|
|
92
94
|
|
|
93
95
|
``-W``, ``--task-timeout`` *SEC*
|
|
@@ -94,8 +94,10 @@
|
|
|
94
94
|
|
|
95
95
|
``.provider``
|
|
96
96
|
Database provider (default: 'sqlite'). Supported alternatives include
|
|
97
|
-
'postgres' (or compatible)
|
|
98
|
-
the
|
|
97
|
+
'postgres' (or compatible) and 'timescale' (alias 'timescaledb'), which is PostgreSQL
|
|
98
|
+
with the TimescaleDB extension: ``hs initdb`` makes the task table a hypertable
|
|
99
|
+
(requires the ``uuid7`` extra; see the TimescaleDB section of :ref:`database <database>`).
|
|
100
|
+
Support for other providers may be considered in the future.
|
|
99
101
|
|
|
100
102
|
``.file``
|
|
101
103
|
Only applicable for SQLite provider.
|
|
@@ -139,6 +141,14 @@
|
|
|
139
141
|
Specify one or more pragmas to apply to database connections (SQLite only).
|
|
140
142
|
For example ``pragmas = { journal_mode = "wal" }`` to enable WAL-mode.
|
|
141
143
|
|
|
144
|
+
``[timescale]``
|
|
145
|
+
Settings for the TimescaleDB shape ``hs initdb`` gives the task table (``timescale``
|
|
146
|
+
provider only; never forwarded to the connection). Keys: ``chunk_interval``
|
|
147
|
+
(default ``"1 week"``), ``columnstore`` (``true``), ``segmentby`` (``"client_id"``),
|
|
148
|
+
``orderby`` (``"id DESC"``), ``policy`` (``true``), and ``compress_after``
|
|
149
|
+
(``"4 weeks"``). For example ``timescale = { chunk_interval = "1 day" }``.
|
|
150
|
+
See the TimescaleDB section of :ref:`database <database>`.
|
|
151
|
+
|
|
142
152
|
``*``
|
|
143
153
|
Any additional arguments are forwarded to the provider, e.g., ``encoding = 'utf-8'``.
|
|
144
154
|
|
|
@@ -0,0 +1,412 @@
|
|
|
1
|
+
|
|
|
2
|
+
|
|
3
|
+
*HyperShell* can operate entirely within memory and does not require a database.
|
|
4
|
+
This is desirable for ad-hoc, short-lived, or in extreme high-throughput scenarios.
|
|
5
|
+
However, some capabilities are only possible when a database is active
|
|
6
|
+
(such as server restart, task retry, task history, etc).
|
|
7
|
+
|
|
8
|
+
-------------------
|
|
9
|
+
|
|
10
|
+
Connecting
|
|
11
|
+
----------
|
|
12
|
+
|
|
13
|
+
|
|
|
14
|
+
|
|
15
|
+
Connection details must to be specified by your configuration.
|
|
16
|
+
This can be entirely through environment variables or within files.
|
|
17
|
+
|
|
18
|
+
SQLite only needs the local file path.
|
|
19
|
+
|
|
20
|
+
.. admonition:: Configuration with SQLite file path
|
|
21
|
+
:class: note
|
|
22
|
+
|
|
23
|
+
.. code-block:: toml
|
|
24
|
+
|
|
25
|
+
[database]
|
|
26
|
+
file = "/var/lib/hypershell/main.db"
|
|
27
|
+
|
|
28
|
+
Or via a single environment variable, ``HYPERSHELL_DATABASE_FILE=/tmp/pipeline/task.db``.
|
|
29
|
+
|
|
30
|
+
The default `provider` is SQLite; Postgres must be enabled and requires the ``postgres``
|
|
31
|
+
extra (or a production variant — see :ref:`install`). A local database with local account
|
|
32
|
+
authentication simply needs to know the database name.
|
|
33
|
+
|
|
34
|
+
.. admonition:: Configuration file with basic Postgres
|
|
35
|
+
:class: note
|
|
36
|
+
|
|
37
|
+
.. code-block:: toml
|
|
38
|
+
|
|
39
|
+
[database]
|
|
40
|
+
provider = "postgres"
|
|
41
|
+
database = "hypershell"
|
|
42
|
+
|
|
43
|
+
The ``port`` is assumed to be 5432 but can be specified. If a ``user`` is given then so too must
|
|
44
|
+
a ``password``. The default `public` schema is assumed but can also be specified. Anything else
|
|
45
|
+
is forwarded to the database as a connection parameter; e.g., ``encoding = "utf-8"``.
|
|
46
|
+
|
|
47
|
+
Any parameter ending in the special suffixes ``_env`` or ``_eval`` are interpolated into the
|
|
48
|
+
configuration. E.g., ``password_env`` treats its value as the name of an environment variable
|
|
49
|
+
and ``password_eval`` executes its value as a shell command, both exposing a ``.password`` as the
|
|
50
|
+
expanded version.
|
|
51
|
+
|
|
52
|
+
The special ``.echo`` parameter can be set to ``true`` to enable verbose logging of all database
|
|
53
|
+
transactions. These will be emitted as ``INFO`` level messages.
|
|
54
|
+
|
|
55
|
+
See also the *database* section in the :ref:`configuration <config>` parameter reference.
|
|
56
|
+
|
|
57
|
+
-------------------
|
|
58
|
+
|
|
59
|
+
SQLite Pragmas
|
|
60
|
+
--------------
|
|
61
|
+
|
|
62
|
+
|
|
|
63
|
+
|
|
64
|
+
When using SQLite you can tune the underlying database connection with `pragmas
|
|
65
|
+
<https://sqlite.org/pragma.html>`_. Because pragmas apply per-connection and do not persist,
|
|
66
|
+
*HyperShell* re-applies them automatically every time it opens a connection. Specify them as a
|
|
67
|
+
``pragmas`` table within the ``[database]`` section:
|
|
68
|
+
|
|
69
|
+
.. admonition:: Configuration with SQLite pragmas
|
|
70
|
+
:class: note
|
|
71
|
+
|
|
72
|
+
.. code-block:: toml
|
|
73
|
+
|
|
74
|
+
[database]
|
|
75
|
+
file = "/var/lib/hypershell/main.db"
|
|
76
|
+
pragmas = {journal_mode = "wal", cache_size = 10000, busy_timeout = 5000}
|
|
77
|
+
|
|
78
|
+
Each entry is issued verbatim as ``PRAGMA <name>=<value>`` on connect. The example above is a good
|
|
79
|
+
general-purpose starting point for concurrent workflows: WAL journaling improves reader/writer
|
|
80
|
+
concurrency, a larger page cache reduces I/O, and a busy timeout lets writers wait briefly rather
|
|
81
|
+
than failing immediately when the database is momentarily locked.
|
|
82
|
+
|
|
83
|
+
Individual pragmas can also be set from the command line:
|
|
84
|
+
|
|
85
|
+
.. admonition:: Set a single pragma
|
|
86
|
+
:class: note
|
|
87
|
+
|
|
88
|
+
.. code-block:: shell
|
|
89
|
+
|
|
90
|
+
hs config set database.pragmas.journal_mode wal
|
|
91
|
+
|
|
92
|
+
.. note::
|
|
93
|
+
|
|
94
|
+
Running ``hs initdb`` (or launching with ``--initdb``) additionally performs a
|
|
95
|
+
``PRAGMA optimize``. This is safe to run routinely and helps SQLite keep its query-planner
|
|
96
|
+
statistics current. See `optimize <https://sqlite.org/pragma.html#pragma_optimize>`_ for details.
|
|
97
|
+
|
|
98
|
+
-------------------
|
|
99
|
+
|
|
100
|
+
Initialization
|
|
101
|
+
--------------
|
|
102
|
+
|
|
103
|
+
|
|
|
104
|
+
|
|
105
|
+
SQLite is automatically initialized upon opening the connection but
|
|
106
|
+
Postgres must be explicitly initialized via ``hs initdb`` or at launch with
|
|
107
|
+
the ``--initdb`` command-line option.
|
|
108
|
+
|
|
109
|
+
An existing database created by an earlier release is upgraded in place on first use,
|
|
110
|
+
for both SQLite and Postgres; there is no separate migration step. The upgrade only adds what
|
|
111
|
+
is missing (tables, columns, and indexes) and never drops or rewrites existing tasks. The one
|
|
112
|
+
removal is on Postgres, where the ``UNIQUE`` constraints on the retry-chain columns
|
|
113
|
+
(``previous_id`` and ``next_id``) are dropped. The upgrade holds an exclusive lock on the
|
|
114
|
+
tables while it adds columns and builds indexes, which can take minutes on a large database.
|
|
115
|
+
Processes started meanwhile wait for it, logging a line every 30 seconds, and then carry on.
|
|
116
|
+
If the lock is still held after 15 minutes (e.g., by a session left idle in a transaction), the
|
|
117
|
+
upgrade gives up with an error that names what it waited on and leaves the schema unchanged;
|
|
118
|
+
find and stop that session, then try again.
|
|
119
|
+
|
|
120
|
+
SQLite cannot drop a table constraint without rebuilding the table, so a SQLite database
|
|
121
|
+
created by an earlier release (2.8, or the 2.9.0a1 pre-release) keeps those ``UNIQUE``
|
|
122
|
+
constraints. This has no effect on behaviour in normal operation. It only matters in the rare cases where a failed task could be retried twice: two
|
|
123
|
+
servers running against one database (which is not supported), a server killed between
|
|
124
|
+
scheduling a retry and marking the original task as retried, or a task's ``retried`` flag reset
|
|
125
|
+
after the fact. In those cases an older SQLite database rejects the second retry with an error,
|
|
126
|
+
where a newer one records it.
|
|
127
|
+
|
|
128
|
+
See also the :ref:`command-line interface <cli_initdb>` for ``hs initdb``.
|
|
129
|
+
|
|
130
|
+
-------------------
|
|
131
|
+
|
|
132
|
+
TimescaleDB
|
|
133
|
+
-----------
|
|
134
|
+
|
|
135
|
+
|
|
|
136
|
+
|
|
137
|
+
`TimescaleDB <https://github.com/timescale/timescaledb>`_ is a PostgreSQL extension for
|
|
138
|
+
time-series data. It splits a large table into *chunks* by time (a *hypertable*) and can convert
|
|
139
|
+
older chunks into a compressed, column-oriented *columnstore*. A long-lived *HyperShell* database
|
|
140
|
+
fits this shape well: tasks arrive in time order, recent tasks are read and updated constantly,
|
|
141
|
+
and old tasks are kept for history but rarely touched.
|
|
142
|
+
|
|
143
|
+
Select it with the ``timescale`` provider (``timescaledb`` is an alias). It connects exactly like
|
|
144
|
+
PostgreSQL and needs both the ``postgres`` and the ``uuid7`` extras (see :ref:`install`).
|
|
145
|
+
|
|
146
|
+
.. admonition:: Install with TimescaleDB support
|
|
147
|
+
:class: note
|
|
148
|
+
|
|
149
|
+
.. code-block:: shell
|
|
150
|
+
|
|
151
|
+
uv tool install 'hypershell[postgres,uuid7]'
|
|
152
|
+
|
|
153
|
+
.. admonition:: Configuration file with TimescaleDB
|
|
154
|
+
:class: note
|
|
155
|
+
|
|
156
|
+
.. code-block:: toml
|
|
157
|
+
|
|
158
|
+
[database]
|
|
159
|
+
provider = "timescale"
|
|
160
|
+
database = "hypershell"
|
|
161
|
+
|
|
162
|
+
Then initialize the database with ``hs initdb``, or launch ``hs submit`` or ``hs cluster`` with
|
|
163
|
+
``--initdb``, which runs the same initialization. There is nothing else to run. ``hs server`` does
|
|
164
|
+
not initialize the database, even with ``--initdb``; run ``hs initdb`` before launching it.
|
|
165
|
+
|
|
166
|
+
|
|
|
167
|
+
|
|
168
|
+
What initialization does
|
|
169
|
+
^^^^^^^^^^^^^^^^^^^^^^^^
|
|
170
|
+
|
|
171
|
+
Before it creates any table, ``hs initdb`` checks the server. The ``timescaledb`` extension must
|
|
172
|
+
be installed on the server; if it is not yet created in the database we create it (the
|
|
173
|
+
database owner may do so, no superuser needed). We fail with a message naming the problem and the fix,
|
|
174
|
+
and create nothing, when the server does not offer the extension, when the role may not create
|
|
175
|
+
it, when the server does not preload its library (``shared_preload_libraries``), or when the
|
|
176
|
+
extension is older than 2.22.0.
|
|
177
|
+
|
|
178
|
+
After the usual schema step, we bring the ``task`` table to its TimescaleDB shape:
|
|
179
|
+
|
|
180
|
+
* **Hypertable.** ``task`` becomes a hypertable partitioned by its ``id`` column, in chunks of
|
|
181
|
+
one week. The ``client`` and ``source`` tables stay plain tables.
|
|
182
|
+
* **Columnstore.** The columnstore is enabled, segmented by ``client_id`` and ordered by
|
|
183
|
+
``id DESC``, so a compressed chunk keeps each client's tasks together, newest first.
|
|
184
|
+
* **Policy.** A columnstore policy converts chunks older than four weeks.
|
|
185
|
+
|
|
186
|
+
This is equivalent to the following statements, which you therefore never need to run:
|
|
187
|
+
|
|
188
|
+
.. admonition:: What ``hs initdb`` does for you
|
|
189
|
+
:class: note
|
|
190
|
+
|
|
191
|
+
.. code-block:: sql
|
|
192
|
+
|
|
193
|
+
SELECT create_hypertable('task', by_range('id', INTERVAL '1 week'));
|
|
194
|
+
ALTER TABLE task SET (timescaledb.enable_columnstore = true,
|
|
195
|
+
timescaledb.segmentby = 'client_id',
|
|
196
|
+
timescaledb.orderby = 'id DESC');
|
|
197
|
+
CALL add_columnstore_policy('task', after => INTERVAL '4 weeks');
|
|
198
|
+
|
|
199
|
+
Each step is checked first and applied only where something is missing, so running
|
|
200
|
+
``hs initdb`` again, launching ``hs submit`` or ``hs cluster`` with ``--initdb`` every time, or
|
|
201
|
+
truncating the database with ``hs initdb --truncate`` always arrives at the same state, with one
|
|
202
|
+
policy. A database already in shape logs nothing. Initialization runs in one transaction,
|
|
203
|
+
serialized with the schema step, so concurrent launches are safe.
|
|
204
|
+
|
|
205
|
+
If someone changed the chunk interval, the columnstore settings, or the policy's interval by hand,
|
|
206
|
+
the next ``hs initdb`` puts them back to the configured values (see *Tuning* below) and logs each
|
|
207
|
+
change. A new chunk interval applies to new
|
|
208
|
+
chunks only, and new columnstore settings apply to chunks converted from then on; existing chunks
|
|
209
|
+
keep theirs (recompress them by hand if needed). Turning the columnstore off is never done for
|
|
210
|
+
you; ``hs initdb`` warns instead. If the policy's last run failed, ``hs initdb`` warns and points
|
|
211
|
+
to ``timescaledb_information.job_stats``.
|
|
212
|
+
|
|
213
|
+
Only ``hs initdb`` (with or without ``--truncate``), and ``hs submit`` or ``hs cluster`` launched
|
|
214
|
+
with ``--initdb``, run this initialization. Every other command, including ``hs server`` with or
|
|
215
|
+
without ``--initdb`` and ``hs submit`` or ``hs cluster`` without it, runs only the schema step, as
|
|
216
|
+
for PostgreSQL, and stops on a database that was never initialized. Run ``hs initdb`` after
|
|
217
|
+
upgrading *HyperShell* or TimescaleDB.
|
|
218
|
+
|
|
219
|
+
|
|
|
220
|
+
|
|
221
|
+
Tuning
|
|
222
|
+
^^^^^^
|
|
223
|
+
|
|
224
|
+
The defaults suit most sites; zero configuration is the norm. To change them, add a ``timescale``
|
|
225
|
+
table to the ``[database]`` section. Each key is optional and falls back to its default.
|
|
226
|
+
|
|
227
|
+
.. admonition:: Configuration file with TimescaleDB settings
|
|
228
|
+
:class: note
|
|
229
|
+
|
|
230
|
+
.. code-block:: toml
|
|
231
|
+
|
|
232
|
+
[database]
|
|
233
|
+
provider = "timescale"
|
|
234
|
+
database = "hypershell"
|
|
235
|
+
|
|
236
|
+
[database.timescale]
|
|
237
|
+
chunk_interval = "1 day"
|
|
238
|
+
compress_after = "2 weeks"
|
|
239
|
+
|
|
240
|
+
================== =============== ==========================================================
|
|
241
|
+
Key Default Meaning
|
|
242
|
+
================== =============== ==========================================================
|
|
243
|
+
``chunk_interval`` ``"1 week"`` Time span of each chunk of ``task``.
|
|
244
|
+
``columnstore`` ``true`` Enable the columnstore on ``task``.
|
|
245
|
+
``segmentby`` ``"client_id"`` Columns that group rows in a compressed chunk
|
|
246
|
+
(comma-separated task columns, each once, or ``""`` for none).
|
|
247
|
+
``orderby`` ``"id DESC"`` Order of rows in a compressed chunk
|
|
248
|
+
(``<column> [ASC|DESC] [NULLS FIRST|LAST]``, comma-separated,
|
|
249
|
+
each column once). TimescaleDB appends ``id DESC`` when
|
|
250
|
+
neither list names ``id``.
|
|
251
|
+
``policy`` ``true`` Keep a columnstore policy on ``task``.
|
|
252
|
+
``compress_after`` ``"4 weeks"`` Age at which the policy converts a chunk.
|
|
253
|
+
================== =============== ==========================================================
|
|
254
|
+
|
|
255
|
+
Intervals are a positive whole number and a unit, from ``microseconds`` to ``months``
|
|
256
|
+
(e.g., ``"12 hours"``). Columns are task columns by name, quoted for you where SQL needs it
|
|
257
|
+
(``group``, for instance). An invalid value, an unknown or repeated column, an unknown key, or
|
|
258
|
+
``policy = true`` with ``columnstore = false`` stops every command at startup with a message
|
|
259
|
+
naming the key. So does a column named in both ``segmentby`` and ``orderby``, defaults included,
|
|
260
|
+
since TimescaleDB cannot use one column for both segmenting and ordering:
|
|
261
|
+
``orderby = "client_id DESC"`` needs a ``segmentby`` without ``client_id``, and
|
|
262
|
+
``segmentby = "id"`` needs an ``orderby`` without ``id``.
|
|
263
|
+
|
|
264
|
+
Changes take effect at the next ``hs initdb``, which applies them as described above: a new
|
|
265
|
+
``chunk_interval`` applies to new chunks only, new ``segmentby`` or ``orderby`` to chunks converted
|
|
266
|
+
from then on, and a new ``compress_after`` replaces the policy. Setting ``policy = false`` removes
|
|
267
|
+
an existing policy. Setting ``columnstore = false`` (with ``policy = false``) stops ``hs initdb``
|
|
268
|
+
from enabling the columnstore, but does not disable one that is already on; it warns instead.
|
|
269
|
+
|
|
270
|
+
|
|
|
271
|
+
|
|
272
|
+
Why the task identifier is the partition key
|
|
273
|
+
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
|
274
|
+
|
|
275
|
+
With the ``uuid7`` extra, every task identifier is a
|
|
276
|
+
`UUIDv7 <https://www.rfc-editor.org/rfc/rfc9562#name-uuid-version-7>`_, whose leading 48 bits are
|
|
277
|
+
the time it was created, in milliseconds. Since TimescaleDB 2.22.0 a hypertable can be partitioned
|
|
278
|
+
directly by such a column: the timestamp inside the id decides the chunk. So the primary key
|
|
279
|
+
carries row identity, creation time, and chunk routing in one value, and we need no separate time
|
|
280
|
+
column. A lookup or update by ``id`` needs only one chunk, and a range of ids is a range of
|
|
281
|
+
time, which lets PostgreSQL skip every chunk outside it (*chunk exclusion*).
|
|
282
|
+
|
|
283
|
+
.. important::
|
|
284
|
+
|
|
285
|
+
**Every process that creates tasks needs the** ``uuid7`` **extra**, not only the server:
|
|
286
|
+
anything running ``hs submit``, ``hs cluster`` or ``hsx``, or using the library to submit
|
|
287
|
+
tasks. TimescaleDB routes each row by the timestamp inside its id and rejects any other UUID
|
|
288
|
+
version: inserting a UUIDv4 fails with SQLSTATE ``0A000`` (``... is not a version 7 UUID``),
|
|
289
|
+
and the error aborts the whole ``INSERT``, so one bad id loses the entire bundle of tasks
|
|
290
|
+
submitted with it. *HyperShell* refuses to start under the ``timescale`` provider without
|
|
291
|
+
the extra.
|
|
292
|
+
|
|
293
|
+
|
|
|
294
|
+
|
|
295
|
+
Support matrix
|
|
296
|
+
^^^^^^^^^^^^^^
|
|
297
|
+
|
|
298
|
+
===================== =============================================================================
|
|
299
|
+
TimescaleDB Behavior
|
|
300
|
+
===================== =============================================================================
|
|
301
|
+
before 2.22.0 ``hs initdb`` fails: partitioning by a UUIDv7 column is not available.
|
|
302
|
+
2.22.0 – 2.24.x Hypertable and columnstore; **no policy**. These releases accept the policy,
|
|
303
|
+
but every run of it fails on a UUID-partitioned table, so we skip it and warn.
|
|
304
|
+
2.25.0 and later Everything above. Tested in CI on 2.31.0 (and on 2.24.0 for the gate).
|
|
305
|
+
===================== =============================================================================
|
|
306
|
+
|
|
307
|
+
Current TimescaleDB releases support PostgreSQL 16, 17 and 18 (2.29.0 dropped PostgreSQL 15).
|
|
308
|
+
|
|
309
|
+
TimescaleDB comes in two editions, and ``hs initdb`` reads which one the server runs
|
|
310
|
+
(``timescaledb.license``):
|
|
311
|
+
|
|
312
|
+
* **Community** (``timescaledb.license = 'timescale'``, the Timescale License): everything above.
|
|
313
|
+
This is what the official ``timescale/timescaledb`` container images and the TimescaleDB
|
|
314
|
+
packages ship.
|
|
315
|
+
* **Apache** (``timescaledb.license = 'apache'``, Apache-2.0 only, e.g. the ``-oss`` images):
|
|
316
|
+
hypertables, but no columnstore and no policy. We create the hypertable and skip the rest, with
|
|
317
|
+
a warning each time.
|
|
318
|
+
|
|
319
|
+
Where you run PostgreSQL matters. Self-hosted servers can use the official packages or container
|
|
320
|
+
images. *Tiger Cloud* is the managed service from the makers of TimescaleDB. Several other
|
|
321
|
+
managed PostgreSQL offerings do not ship the extension at all, and some ship only the Apache
|
|
322
|
+
edition (as of August 2026); check your provider's list of extensions before choosing the
|
|
323
|
+
``timescale`` provider there.
|
|
324
|
+
|
|
325
|
+
The project's naming has moved over time: *TimescaleDB* is the extension; the company, formerly
|
|
326
|
+
Timescale, is *TigerData* since 2025; and *Tiger Cloud* is its managed service.
|
|
327
|
+
|
|
328
|
+
|
|
|
329
|
+
|
|
330
|
+
Querying by time
|
|
331
|
+
^^^^^^^^^^^^^^^^
|
|
332
|
+
|
|
333
|
+
TimescaleDB adds functions for UUIDv7 values (since 2.22.0). To filter tasks by time, compare the
|
|
334
|
+
``id`` against a boundary id built from a timestamp with ``to_uuidv7_boundary()``. To show when a
|
|
335
|
+
task was created, read the timestamp back out with ``uuid_timestamp()``.
|
|
336
|
+
|
|
337
|
+
.. admonition:: Tasks created in the last day, with their creation time
|
|
338
|
+
:class: note
|
|
339
|
+
|
|
340
|
+
.. code-block:: sql
|
|
341
|
+
|
|
342
|
+
SELECT uuid_timestamp(id) AS created, args, exit_status
|
|
343
|
+
FROM task
|
|
344
|
+
WHERE id >= to_uuidv7_boundary(now() - INTERVAL '1 day')
|
|
345
|
+
ORDER BY id;
|
|
346
|
+
|
|
347
|
+
.. warning::
|
|
348
|
+
|
|
349
|
+
Filter on ``id`` itself, as above. A predicate on a function of the id, such as
|
|
350
|
+
``WHERE uuid_timestamp(id) > now() - INTERVAL '1 day'``, cannot use chunk exclusion and scans
|
|
351
|
+
every chunk, compressed ones included.
|
|
352
|
+
|
|
353
|
+
|
|
|
354
|
+
|
|
355
|
+
Background workers
|
|
356
|
+
^^^^^^^^^^^^^^^^^^
|
|
357
|
+
|
|
358
|
+
Policies run as TimescaleDB background jobs. The server needs one worker for the launcher, one
|
|
359
|
+
scheduler for each database that has the extension, and one more for each job while it runs, all
|
|
360
|
+
counted against ``timescaledb.max_background_workers`` (default 16), which in turn must fit within
|
|
361
|
+
PostgreSQL's ``max_worker_processes``. When the workers run out, a database's scheduler does not
|
|
362
|
+
start and its policies silently never run: the server log notes it once, and ``hs initdb`` cannot
|
|
363
|
+
see it. If many databases on one server use the extension, raise
|
|
364
|
+
``timescaledb.max_background_workers`` (and ``max_worker_processes``) and restart the server. See
|
|
365
|
+
the TimescaleDB documentation on configuring background workers.
|
|
366
|
+
|
|
367
|
+
|
|
|
368
|
+
|
|
369
|
+
Converting an existing table
|
|
370
|
+
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
|
371
|
+
|
|
372
|
+
``hs initdb`` converts ``task`` only while it is empty. A plain ``task`` table that already holds
|
|
373
|
+
tasks (for example, a database created by an earlier release, or under the ``postgres`` provider)
|
|
374
|
+
is left as it is: ``hs initdb`` succeeds, upgrades the schema, and warns. Everything keeps working
|
|
375
|
+
on the plain table.
|
|
376
|
+
|
|
377
|
+
To convert it yourself, stop every *HyperShell* process using the database and run:
|
|
378
|
+
|
|
379
|
+
.. admonition:: Convert a populated task table by hand
|
|
380
|
+
:class: note
|
|
381
|
+
|
|
382
|
+
.. code-block:: sql
|
|
383
|
+
|
|
384
|
+
SELECT create_hypertable('task', by_range('id', INTERVAL '1 week'),
|
|
385
|
+
create_default_indexes => false, migrate_data => true);
|
|
386
|
+
|
|
387
|
+
then run ``hs initdb`` to add the columnstore and its policy. Be aware that:
|
|
388
|
+
|
|
389
|
+
* It copies every row into chunks in a single transaction, holding an exclusive lock on ``task``
|
|
390
|
+
throughout; on a large table this takes a long time and needs room for a second copy.
|
|
391
|
+
* It aborts, converting nothing, if any task id is not a UUIDv7. Databases written without the
|
|
392
|
+
``uuid7`` extra (e.g., by releases before 2.9 with only the ``postgres`` extra) hold UUIDv4 ids
|
|
393
|
+
and cannot be converted in place; start a new database instead.
|
|
394
|
+
|
|
395
|
+
|
|
|
396
|
+
|
|
397
|
+
Beyond the defaults
|
|
398
|
+
^^^^^^^^^^^^^^^^^^^
|
|
399
|
+
|
|
400
|
+
We set up only what every *HyperShell* database benefits from. Data retention and continuous
|
|
401
|
+
aggregates are left to you, through TimescaleDB directly. On a hypertable partitioned by a UUIDv7
|
|
402
|
+
column, as ``task`` is, these need a newer TimescaleDB than the 2.22.0 floor:
|
|
403
|
+
|
|
404
|
+
* ``show_chunks`` and ``drop_chunks`` given a time or an interval (``older_than``,
|
|
405
|
+
``newer_than``): 2.23.0 (`#8746 <https://github.com/timescale/timescaledb/pull/8746>`_).
|
|
406
|
+
* Continuous aggregates: 2.24.0
|
|
407
|
+
(`#8939 <https://github.com/timescale/timescaledb/pull/8939>`_).
|
|
408
|
+
* Retention policies (``add_retention_policy``): 2.25.0
|
|
409
|
+
(`#9102 <https://github.com/timescale/timescaledb/pull/9102>`_).
|
|
410
|
+
|
|
411
|
+
See the TimescaleDB
|
|
412
|
+
`changelog <https://github.com/timescale/timescaledb/blob/main/CHANGELOG.md>`_ for these releases.
|
|
@@ -37,6 +37,12 @@ local account authentication simply needs to know the database name.
|
|
|
37
37
|
provider = "postgres"
|
|
38
38
|
database = "hypershell"
|
|
39
39
|
|
|
40
|
+
With the ``timescale`` provider (alias ``timescaledb``) the database is PostgreSQL with the
|
|
41
|
+
TimescaleDB extension, and ``hs initdb`` also makes the ``task`` table a hypertable partitioned by
|
|
42
|
+
its UUIDv7 ``id``, with columnstore compression and a policy where the server's TimescaleDB edition
|
|
43
|
+
and version support them. Every process that submits tasks then needs the ``uuid7`` extra.
|
|
44
|
+
See the TimescaleDB section of the database documentation.
|
|
45
|
+
|
|
40
46
|
The ``port`` is assumed to be 5432 but can be specified. If a ``user`` is given then so too must
|
|
41
47
|
a ``password``. The default `public` schema is assumed but can also be specified. Anything else
|
|
42
48
|
is forwarded to the database as a connection parameter; e.g., ``encoding = "utf-8"``.
|
|
@@ -16,5 +16,14 @@ exhausted), scheduling halts with a critical message; under ``--forever`` the sc
|
|
|
16
16
|
warns and waits for those tasks to be cleared or reverted (see ``hs update``). Use
|
|
17
17
|
``--max-retries`` and ``--eager`` to tune retry behavior within a group.
|
|
18
18
|
|
|
19
|
+
A task file given to ``hs cluster`` or ``hs server`` is read in full before scheduling begins, so
|
|
20
|
+
its groups run in ascending order whatever order the file lists them in. Input on standard input
|
|
21
|
+
or a pipe is scheduled as it arrives, which is best effort: a lower group that arrives after a
|
|
22
|
+
higher group has started runs once the current group finishes, and *HyperShell* logs a warning
|
|
23
|
+
naming both groups. The clients that ``hs cluster`` launches start once the file is read, so
|
|
24
|
+
their ``-T``/``--timeout`` clock does not run while it is read. A client connected to
|
|
25
|
+
``hs server`` whose ``-T``/``--timeout`` is shorter than the time to read the file reaches that
|
|
26
|
+
timeout and exits before any task is scheduled, and the server then waits for new clients.
|
|
27
|
+
|
|
19
28
|
Filter or update tasks by group with the ``-g``/``--group`` option of ``hs list`` and
|
|
20
29
|
``hs update``.
|
|
@@ -53,6 +53,8 @@ the package directly from the package index, the following optional `extras` are
|
|
|
53
53
|
intended for production deployments.
|
|
54
54
|
* ``uuid7``: install `uuid-utils <https://pypi.org/project/uuid-utils/>`_ to auto-enable
|
|
55
55
|
UUIDv7 task identifiers. Without this extra, task IDs use the standard-library UUIDv4.
|
|
56
|
+
The TimescaleDB provider requires it on every host that submits tasks, not only the server
|
|
57
|
+
(see the TimescaleDB section of :ref:`database <database>`).
|
|
56
58
|
* ``zstd``: enable `Zstandard <https://facebook.github.io/zstd/>`_ as a log-rotation
|
|
57
59
|
compression option (``logging.compress = "zstd"``).
|
|
58
60
|
* ``cron``: enable cron-style, time-based log-rotation schedules via
|
|
@@ -28,7 +28,7 @@ level margin: \\n[rst2man-indent\\n[rst2man-indent-level]]
|
|
|
28
28
|
.\" new: \\n[rst2man-indent\\n[rst2man-indent-level]]
|
|
29
29
|
.in \\n[rst2man-indent\\n[rst2man-indent-level]]u
|
|
30
30
|
..
|
|
31
|
-
.TH "HS" "1" "Nov
|
|
31
|
+
.TH "HS" "1" "Nov 04, 2026" "2.9.0a3" "hypershell"
|
|
32
32
|
.SH NAME
|
|
33
33
|
hs \- Process shell commands over a distributed, asynchronous queue
|
|
34
34
|
.SH SYNOPSIS
|
|
@@ -869,6 +869,8 @@ Mutually exclusive with both \fB\-\-output\fP and \fB\-\-errors\fP\&.
|
|
|
869
869
|
Timeout in seconds for client. Automatically shutdown if no tasks received (default: never).
|
|
870
870
|
.sp
|
|
871
871
|
This feature allows for gracefully scaling down a cluster when task throughput subsides.
|
|
872
|
+
The timeout counts from when the client starts, after any \fB\-\-delay\-start\fP, so the delay
|
|
873
|
+
does not count toward it.
|
|
872
874
|
.TP
|
|
873
875
|
.B \fB\-W\fP, \fB\-\-task\-timeout\fP \fISEC\fP
|
|
874
876
|
Task\-level walltime limit (default: none).
|
|
@@ -1975,6 +1977,15 @@ exhausted), scheduling halts with a critical message; under \fB\-\-forever\fP th
|
|
|
1975
1977
|
warns and waits for those tasks to be cleared or reverted (see \fBhs update\fP). Use
|
|
1976
1978
|
\fB\-\-max\-retries\fP and \fB\-\-eager\fP to tune retry behavior within a group.
|
|
1977
1979
|
.sp
|
|
1980
|
+
A task file given to \fBhs cluster\fP or \fBhs server\fP is read in full before scheduling begins, so
|
|
1981
|
+
its groups run in ascending order whatever order the file lists them in. Input on standard input
|
|
1982
|
+
or a pipe is scheduled as it arrives, which is best effort: a lower group that arrives after a
|
|
1983
|
+
higher group has started runs once the current group finishes, and \fIHyperShell\fP logs a warning
|
|
1984
|
+
naming both groups. The clients that \fBhs cluster\fP launches start once the file is read, so
|
|
1985
|
+
their \fB\-T\fP/\fB\-\-timeout\fP clock does not run while it is read. A client connected to
|
|
1986
|
+
\fBhs server\fP whose \fB\-T\fP/\fB\-\-timeout\fP is shorter than the time to read the file reaches that
|
|
1987
|
+
timeout and exits before any task is scheduled, and the server then waits for new clients.
|
|
1988
|
+
.sp
|
|
1978
1989
|
Filter or update tasks by group with the \fB\-g\fP/\fB\-\-group\fP option of \fBhs list\fP and
|
|
1979
1990
|
\fBhs update\fP\&.
|
|
1980
1991
|
.SH CONFIGURATION
|
|
@@ -2192,8 +2203,10 @@ When provided, this takes precedence over and short\-circuits the individual
|
|
|
2192
2203
|
.TP
|
|
2193
2204
|
.B \fB\&.provider\fP
|
|
2194
2205
|
Database provider (default: \(aqsqlite\(aq). Supported alternatives include
|
|
2195
|
-
\(aqpostgres\(aq (or compatible)
|
|
2196
|
-
the
|
|
2206
|
+
\(aqpostgres\(aq (or compatible) and \(aqtimescale\(aq (alias \(aqtimescaledb\(aq), which is PostgreSQL
|
|
2207
|
+
with the TimescaleDB extension: \fBhs initdb\fP makes the task table a hypertable
|
|
2208
|
+
(requires the \fBuuid7\fP extra; see the TimescaleDB section of \fI\%database\fP).
|
|
2209
|
+
Support for other providers may be considered in the future.
|
|
2197
2210
|
.TP
|
|
2198
2211
|
.B \fB\&.file\fP
|
|
2199
2212
|
Only applicable for SQLite provider.
|
|
@@ -2237,6 +2250,14 @@ e.g., \fBsqlite3\fP or \fBpsycopg\fP\&.
|
|
|
2237
2250
|
Specify one or more pragmas to apply to database connections (SQLite only).
|
|
2238
2251
|
For example \fBpragmas = { journal_mode = \(dqwal\(dq }\fP to enable WAL\-mode.
|
|
2239
2252
|
.TP
|
|
2253
|
+
.B \fB[timescale]\fP
|
|
2254
|
+
Settings for the TimescaleDB shape \fBhs initdb\fP gives the task table (\fBtimescale\fP
|
|
2255
|
+
provider only; never forwarded to the connection). Keys: \fBchunk_interval\fP
|
|
2256
|
+
(default \fB\(dq1 week\(dq\fP), \fBcolumnstore\fP (\fBtrue\fP), \fBsegmentby\fP (\fB\(dqclient_id\(dq\fP),
|
|
2257
|
+
\fBorderby\fP (\fB\(dqid DESC\(dq\fP), \fBpolicy\fP (\fBtrue\fP), and \fBcompress_after\fP
|
|
2258
|
+
(\fB\(dq4 weeks\(dq\fP). For example \fBtimescale = { chunk_interval = \(dq1 day\(dq }\fP\&.
|
|
2259
|
+
See the TimescaleDB section of \fI\%database\fP\&.
|
|
2260
|
+
.TP
|
|
2240
2261
|
.B \fB*\fP
|
|
2241
2262
|
Any additional arguments are forwarded to the provider, e.g., \fBencoding = \(aqutf\-8\(aq\fP\&.
|
|
2242
2263
|
.UNINDENT
|
|
@@ -2677,6 +2698,12 @@ database = \(dqhypershell\(dq
|
|
|
2677
2698
|
.UNINDENT
|
|
2678
2699
|
.UNINDENT
|
|
2679
2700
|
.sp
|
|
2701
|
+
With the \fBtimescale\fP provider (alias \fBtimescaledb\fP) the database is PostgreSQL with the
|
|
2702
|
+
TimescaleDB extension, and \fBhs initdb\fP also makes the \fBtask\fP table a hypertable partitioned by
|
|
2703
|
+
its UUIDv7 \fBid\fP, with columnstore compression and a policy where the server\(aqs TimescaleDB edition
|
|
2704
|
+
and version support them. Every process that submits tasks then needs the \fBuuid7\fP extra.
|
|
2705
|
+
See the TimescaleDB section of the database documentation.
|
|
2706
|
+
.sp
|
|
2680
2707
|
The \fBport\fP is assumed to be 5432 but can be specified. If a \fBuser\fP is given then so too must
|
|
2681
2708
|
a \fBpassword\fP\&. The default \fIpublic\fP schema is assumed but can also be specified. Anything else
|
|
2682
2709
|
is forwarded to the database as a connection parameter; e.g., \fBencoding = \(dqutf\-8\(dq\fP\&.
|
|
@@ -28,7 +28,7 @@ level margin: \\n[rst2man-indent\\n[rst2man-indent-level]]
|
|
|
28
28
|
.\" new: \\n[rst2man-indent\\n[rst2man-indent-level]]
|
|
29
29
|
.in \\n[rst2man-indent\\n[rst2man-indent-level]]u
|
|
30
30
|
..
|
|
31
|
-
.TH "HS" "1" "Nov
|
|
31
|
+
.TH "HS" "1" "Nov 04, 2026" "2.9.0a3" "hypershell"
|
|
32
32
|
.SH NAME
|
|
33
33
|
hs \- Process shell commands over a distributed, asynchronous queue
|
|
34
34
|
.SH SYNOPSIS
|
|
@@ -869,6 +869,8 @@ Mutually exclusive with both \fB\-\-output\fP and \fB\-\-errors\fP\&.
|
|
|
869
869
|
Timeout in seconds for client. Automatically shutdown if no tasks received (default: never).
|
|
870
870
|
.sp
|
|
871
871
|
This feature allows for gracefully scaling down a cluster when task throughput subsides.
|
|
872
|
+
The timeout counts from when the client starts, after any \fB\-\-delay\-start\fP, so the delay
|
|
873
|
+
does not count toward it.
|
|
872
874
|
.TP
|
|
873
875
|
.B \fB\-W\fP, \fB\-\-task\-timeout\fP \fISEC\fP
|
|
874
876
|
Task\-level walltime limit (default: none).
|
|
@@ -1975,6 +1977,15 @@ exhausted), scheduling halts with a critical message; under \fB\-\-forever\fP th
|
|
|
1975
1977
|
warns and waits for those tasks to be cleared or reverted (see \fBhs update\fP). Use
|
|
1976
1978
|
\fB\-\-max\-retries\fP and \fB\-\-eager\fP to tune retry behavior within a group.
|
|
1977
1979
|
.sp
|
|
1980
|
+
A task file given to \fBhs cluster\fP or \fBhs server\fP is read in full before scheduling begins, so
|
|
1981
|
+
its groups run in ascending order whatever order the file lists them in. Input on standard input
|
|
1982
|
+
or a pipe is scheduled as it arrives, which is best effort: a lower group that arrives after a
|
|
1983
|
+
higher group has started runs once the current group finishes, and \fIHyperShell\fP logs a warning
|
|
1984
|
+
naming both groups. The clients that \fBhs cluster\fP launches start once the file is read, so
|
|
1985
|
+
their \fB\-T\fP/\fB\-\-timeout\fP clock does not run while it is read. A client connected to
|
|
1986
|
+
\fBhs server\fP whose \fB\-T\fP/\fB\-\-timeout\fP is shorter than the time to read the file reaches that
|
|
1987
|
+
timeout and exits before any task is scheduled, and the server then waits for new clients.
|
|
1988
|
+
.sp
|
|
1978
1989
|
Filter or update tasks by group with the \fB\-g\fP/\fB\-\-group\fP option of \fBhs list\fP and
|
|
1979
1990
|
\fBhs update\fP\&.
|
|
1980
1991
|
.SH CONFIGURATION
|
|
@@ -2192,8 +2203,10 @@ When provided, this takes precedence over and short\-circuits the individual
|
|
|
2192
2203
|
.TP
|
|
2193
2204
|
.B \fB\&.provider\fP
|
|
2194
2205
|
Database provider (default: \(aqsqlite\(aq). Supported alternatives include
|
|
2195
|
-
\(aqpostgres\(aq (or compatible)
|
|
2196
|
-
the
|
|
2206
|
+
\(aqpostgres\(aq (or compatible) and \(aqtimescale\(aq (alias \(aqtimescaledb\(aq), which is PostgreSQL
|
|
2207
|
+
with the TimescaleDB extension: \fBhs initdb\fP makes the task table a hypertable
|
|
2208
|
+
(requires the \fBuuid7\fP extra; see the TimescaleDB section of \fI\%database\fP).
|
|
2209
|
+
Support for other providers may be considered in the future.
|
|
2197
2210
|
.TP
|
|
2198
2211
|
.B \fB\&.file\fP
|
|
2199
2212
|
Only applicable for SQLite provider.
|
|
@@ -2237,6 +2250,14 @@ e.g., \fBsqlite3\fP or \fBpsycopg\fP\&.
|
|
|
2237
2250
|
Specify one or more pragmas to apply to database connections (SQLite only).
|
|
2238
2251
|
For example \fBpragmas = { journal_mode = \(dqwal\(dq }\fP to enable WAL\-mode.
|
|
2239
2252
|
.TP
|
|
2253
|
+
.B \fB[timescale]\fP
|
|
2254
|
+
Settings for the TimescaleDB shape \fBhs initdb\fP gives the task table (\fBtimescale\fP
|
|
2255
|
+
provider only; never forwarded to the connection). Keys: \fBchunk_interval\fP
|
|
2256
|
+
(default \fB\(dq1 week\(dq\fP), \fBcolumnstore\fP (\fBtrue\fP), \fBsegmentby\fP (\fB\(dqclient_id\(dq\fP),
|
|
2257
|
+
\fBorderby\fP (\fB\(dqid DESC\(dq\fP), \fBpolicy\fP (\fBtrue\fP), and \fBcompress_after\fP
|
|
2258
|
+
(\fB\(dq4 weeks\(dq\fP). For example \fBtimescale = { chunk_interval = \(dq1 day\(dq }\fP\&.
|
|
2259
|
+
See the TimescaleDB section of \fI\%database\fP\&.
|
|
2260
|
+
.TP
|
|
2240
2261
|
.B \fB*\fP
|
|
2241
2262
|
Any additional arguments are forwarded to the provider, e.g., \fBencoding = \(aqutf\-8\(aq\fP\&.
|
|
2242
2263
|
.UNINDENT
|
|
@@ -2677,6 +2698,12 @@ database = \(dqhypershell\(dq
|
|
|
2677
2698
|
.UNINDENT
|
|
2678
2699
|
.UNINDENT
|
|
2679
2700
|
.sp
|
|
2701
|
+
With the \fBtimescale\fP provider (alias \fBtimescaledb\fP) the database is PostgreSQL with the
|
|
2702
|
+
TimescaleDB extension, and \fBhs initdb\fP also makes the \fBtask\fP table a hypertable partitioned by
|
|
2703
|
+
its UUIDv7 \fBid\fP, with columnstore compression and a policy where the server\(aqs TimescaleDB edition
|
|
2704
|
+
and version support them. Every process that submits tasks then needs the \fBuuid7\fP extra.
|
|
2705
|
+
See the TimescaleDB section of the database documentation.
|
|
2706
|
+
.sp
|
|
2680
2707
|
The \fBport\fP is assumed to be 5432 but can be specified. If a \fBuser\fP is given then so too must
|
|
2681
2708
|
a \fBpassword\fP\&. The default \fIpublic\fP schema is assumed but can also be specified. Anything else
|
|
2682
2709
|
is forwarded to the database as a connection parameter; e.g., \fBencoding = \(dqutf\-8\(dq\fP\&.
|