Skip to contents

Retrieve details about server processes associated with a content_item, such as a FastAPI app or a Quarto render.

Usage

get_jobs(content)

Arguments

content

A Content object, as returned by content_item()

Value

A data frame with a row for each job, with the following columns:

  • id: The job identifier.

  • ppid: The job's parent process identifier (see Note 1).

  • pid: The job's process identifier.

  • key: The job's unique key identifier.

  • remote_id: The job's identifier for off-host execution configurations (see Note 1).

  • app_id: The job's parent content identifier

  • variant_id: The identifier of the variant owning this job.

  • bundle_id: The identifier of a content bundle linked to this job.

  • start_time: The timestamp (RFC3339) indicating when this job started.

  • end_time: The timestamp (RFC3339) indicating when this job finished.

  • last_heartbeat_time: The timestamp (RFC3339) indicating the last time this job was observed to be running (see Note 1).

  • queued_time: The timestamp (RFC3339) indicating when this job was added to the queue to be processed. Only scheduled reports will present a value for this field (see Note 1).

  • queue_name: The name of the queue which processes the job. Only scheduled reports will present a value for this field (see Note 1).

  • tag: A tag to identify the nature of the job.

  • exit_code: The job's exit code. Present only when job is finished.

  • status: The current status of the job. On Connect 2022.10.0 and newer, one of Active: 0, Finished: 1, Finalized: 2; on earlier versions, Active: 0, otherwise NA.

  • hostname: The name of the node which processes the job.

  • cluster: The location where this content runs. Content running on the same server as Connect will have either a null value or the string Local. Gives the name of the cluster when run external to the Connect host (see Note 1).

  • image: The location where this content runs. Content running on the same server as Connect will have either a null value or the string Local. References the name of the target image when content runs in a clustered environment such as Kubernetes (see Note 1).

  • run_as: The UNIX user that executed this job.

Details

Note that Connect versions below 2022.10.0 use a legacy endpoint, and will not return the complete set of information provided by newer versions.

Note

  1. On Connect instances earlier than 2022.10.0, these columns will contain NA values.