Skip to main content

Module ctx

Module ctx 

Source
Expand description

schedr dag-ctx: a command task’s processes reading the run’s parameters and information from the agent, over the task’s context channel (decisions 143-147, see schedr_model::ctx).

Blocking and without the configuration: it runs inside a task, which may have none, and is one request and one answer.

Functions§

run_dag_ctx
Runs a schedr dag-ctx command; the error is the message for stderr.
run_task_ctx
Runs a schedr task-ctx command; the error is the message for stderr.
run_task_ctx_api
Runs schedr task-ctx api: prints the answer’s body as one line of JSON.
run_task_ctx_cleanup
Runs schedr task-ctx cleanup add|list: registers a handle before the work it cleans up after, or, in a cleanup, prints the attempt’s handles in registration order: one line of JSON each, or with --field one field’s raw value each; the error is the message for stderr.
run_task_ctx_connection
Runs schedr task-ctx connection NAME: prints a connection’s values, its secrets filled in (decision 174), as one line of JSON in the form --params takes, or with --env PREFIX as export PREFIX_PARAM='value' lines for eval (each value quoted for the shell, so nothing in one runs); the error is the message for stderr, with the error kind.
run_task_ctx_events
Runs schedr task-ctx events: the event posted, or those listed, one line of JSON each.
run_task_ctx_resource
schedr task-ctx resource set|get: reports the value of the resource a CommandResource setup creates (checked against its type at once), or prints the value a resource’s cleanup_command cleans up (as --params takes it: dates as text, tuples as lists).
run_task_ctx_secret
Runs schedr task-ctx secret get: prints a secret the task declares (a key’s value as it is, with no newline; a whole secret as one line of JSON); the error is the message for stderr, with the error kind.