docs: correct the executor list in TASK_REGISTRATION
The "Other Executors" section advertised shell, python and docker executors that were never implemented, and omitted every executor that was. The missing shell executor in particular sent a recent piece of work down the wrong path before the gap was noticed. Lists the modules that actually exist and documents the config for the two new ones. Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
+51
-5
@@ -105,11 +105,57 @@ Calls HTTP endpoints. Supports environment variable substitution in headers/body
|
||||
|
||||
### Other Executors
|
||||
|
||||
- `shell`: Execute shell commands
|
||||
- `python`: Execute Python scripts
|
||||
- `docker`: Docker operations
|
||||
- `backup`: Backup operations
|
||||
- `doc_sync`: Documentation sync
|
||||
The `executor` field is the module name under `src/executors/`. These are the
|
||||
modules that actually exist:
|
||||
|
||||
- `config_backup_executor`: tar.gz backup of mounted directories, with retention
|
||||
- `gcs_backup_executor`: offsite backup to Google Cloud Storage
|
||||
- `doc_sync_executor`: mirror upstream docs into Gitea
|
||||
- `gitea_release_cleanup_executor`: drop old Gitea releases, keeping the newest N
|
||||
- `postgres_retention_executor`: delete rows past a retention window (see below)
|
||||
- `docker_prune_executor`: reclaim Docker disk usage (see below)
|
||||
- `example_executor`: demo/test
|
||||
|
||||
There is **no `shell` or `python` executor**. Earlier revisions of this document
|
||||
listed them and they were never implemented; work needing a shell belongs either
|
||||
in a purpose-built executor or on a host systemd timer.
|
||||
|
||||
#### `postgres_retention_executor`
|
||||
|
||||
Connects with the Scheduler's own Postgres credentials, overriding only the
|
||||
database name, so the target database must grant `scheduler_user` SELECT and
|
||||
DELETE on the table. Table and column names are validated against a strict
|
||||
identifier pattern because they cannot be bound as query parameters.
|
||||
|
||||
```json
|
||||
{
|
||||
"database": "sysmon",
|
||||
"table": "check_history",
|
||||
"timestamp_column": "ts",
|
||||
"retention_days": 30,
|
||||
"dry_run": false
|
||||
}
|
||||
```
|
||||
|
||||
#### `docker_prune_executor`
|
||||
|
||||
Uses the docker socket already mounted into the container. Only the two stages
|
||||
that discard regenerable data are on by default.
|
||||
|
||||
```json
|
||||
{
|
||||
"build_cache": true,
|
||||
"dangling_images": true,
|
||||
"unused_images": false,
|
||||
"volumes": false,
|
||||
"build_cache_until_hours": 168,
|
||||
"dry_run": false
|
||||
}
|
||||
```
|
||||
|
||||
**`volumes` removes volumes belonging to merely-stopped containers, not just
|
||||
orphaned ones.** Leave it off unless you have checked what is currently
|
||||
unattached; on this host it is a plausible way to lose a database.
|
||||
|
||||
## Complete Task Schema
|
||||
|
||||
|
||||
Reference in New Issue
Block a user