core.cli.commands
Attributes
Classes
Matches given patterns with file paths associated with occurring events. |
|
Wraps the InteractiveConsole with some basic shell features: |
Functions
|
Deletes a single instance matching the selector. |
|
Sends mail from a specific mail queue. |
|
Sends the SMS in the smsdir for a given instance. |
|
Continuously spools the SMS in the smsdir for all instances using |
|
Transfers the database and all files from a server running a |
|
Upgrades all application instances of the given namespace(s). |
|
Enters an interactive shell. |
Module Contents
- core.cli.commands.delete(group_context: onegov.core.cli.core.GroupContext) Callable[[CoreRequest, Framework], None] [source]
Deletes a single instance matching the selector.
Selectors matching multiple organisations are disabled for saftey reasons.
- core.cli.commands.sendmail(group_context: onegov.core.cli.core.GroupContext, queue: str, limit: int) None [source]
Sends mail from a specific mail queue.
- core.cli.commands.sendsms(group_context: onegov.core.cli.core.GroupContext) Callable[[CoreRequest, Framework], None] [source]
Sends the SMS in the smsdir for a given instance.
For example:
onegov-core --select '/onegov_town6/meggen' sendsms
- class core.cli.commands.SmsEventHandler(queue_processors: list[onegov.core.sms_processor.SmsQueueProcessor])[source]
Bases:
watchdog.events.PatternMatchingEventHandler
Matches given patterns with file paths associated with occurring events. Uses pathlib’s PurePath.match() method. patterns and ignore_patterns are expected to be a list of strings.
- core.cli.commands.sms_spooler(group_context: onegov.core.cli.core.GroupContext) None [source]
Continuously spools the SMS in the smsdir for all instances using a watchdog that monitors the smsdir for newly created files.
For example:
onegov-core sms-spooler
- core.cli.commands.transfer(group_context: onegov.core.cli.core.GroupContext, server: str, remote_config: str, confirm: bool, no_filestorage: bool, no_database: bool, transfer_schema: str | None, add_admins: bool, delta: bool) None [source]
Transfers the database and all files from a server running a onegov-cloud application and installs them locally, overwriting the local data!
This command expects to have access to the remote server via ssh (no password) and to be run sudo without password. If this is too scary for you, feel free to write something saner.
Only namespaces which are present locally and remotely are considered.
So if you have a ‘cities’ namespace locally and a ‘towns’ namespace on the remote, nothing will happen.
It’s also possible to transfer only a given schema, e.g.
/town6/govikon
or/town6/*
. But beware, global files are copied in any case!WARNING: This may delete local content!
- core.cli.commands.upgrade(group_context: onegov.core.cli.core.GroupContext, dry_run: bool) tuple[Callable[..., Any], Ellipsis] [source]
Upgrades all application instances of the given namespace(s).
- class core.cli.commands.EnhancedInteractiveConsole(locals: dict[str, Any] | None = None)[source]
Bases:
code.InteractiveConsole
Wraps the InteractiveConsole with some basic shell features:
horizontal movement (e.g. arrow keys)
history (e.g. up and down keys)
very basic tab completion
- core.cli.commands.shell() Callable[[CoreRequest, Framework], None] [source]
Enters an interactive shell.