Retrieve details about server processes associated with a content_item
,
such as a FastAPI app or a Quarto render.
Arguments
- content
A Content object, as returned by
content_item()
Value
get_jobs()
: A data frame with a row representing each job.get_job_list()
: A list with each element representing a job.
Jobs contain the following fields:
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; deprecated in favor ofcontent_id
.app_guid
: The job's parent content GUID; deprecated in favor ofcontent_guid
.content_id
: The job's parent content identifier.content_guid
: The job's parent content GUID.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, otherwiseNA
.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.
get_jobs()
returns job data as a data frame, whereas get_jobs_list()
returns job data in a list.
You might get job data as a data frame if you want to perform some calculations about job data (e.g. counting server processes over time), or if you want to filter jobs to find a specific key.
The objects in list returned by get_jobs_list()
are useful if you want to
take an action on a job, such as getting its process log with
get_log()
.
See also
Other job functions:
get_job()
,
get_log()
,
terminate_jobs()
Other content functions:
content_delete()
,
content_item()
,
content_title()
,
content_update()
,
create_random_name()
,
dashboard_url()
,
dashboard_url_chr()
,
delete_thumbnail()
,
delete_vanity_url()
,
deploy_repo()
,
get_bundles()
,
get_environment()
,
get_image()
,
get_job()
,
get_log()
,
get_thumbnail()
,
get_vanity_url()
,
git
,
has_thumbnail()
,
permissions
,
set_image_path()
,
set_run_as()
,
set_thumbnail()
,
set_vanity_url()
,
swap_vanity_url()
,
swap_vanity_urls()
,
terminate_jobs()
,
verify_content_name()
Examples
if (FALSE) { # \dontrun{
client <- connect()
item <- content_item(client, "951bf3ad-82d0-4bca-bba8-9b27e35c49fa")
jobs <- get_jobs(item)
job_list <- get_job_list(item)
} # }