Skip to content

Commit 4e6e5c4

Browse files
authored
chore: remove get_job() (#491)
1 parent d8ef92d commit 4e6e5c4

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

46 files changed

+6
-238
lines changed

NAMESPACE

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,6 @@ export(get_groups)
9797
export(get_image)
9898
export(get_integration)
9999
export(get_integrations)
100-
export(get_job)
101100
export(get_job_list)
102101
export(get_jobs)
103102
export(get_log)

NEWS.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,12 @@
22

33
- Removed `prefix` argument to `connect()` function, which was a convenience utility for testing. (#477)
44

5+
## Breaking changes
6+
7+
- Removed `get_job()`, which was deprecated in 0.6.0. Instead, use `get_jobs()`
8+
to get a data frame of jobs, use `get_job_list()` to get a list of job
9+
objects, and use `get_log()` to get the log for a job (#491).
10+
511
# connectapi 0.9.0
612

713
- New `set_integrations()` function to set the OAuth integration

R/content.R

Lines changed: 0 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -152,19 +152,6 @@ Content <- R6::R6Class(
152152
)
153153
}
154154
},
155-
#' @description Return a single job for this content.
156-
#' @param key The job key.
157-
job = function(key) {
158-
warn_experimental("job")
159-
guid <- self$content$guid
160-
url <- unversioned_url("applications", guid, "job", key)
161-
res <- self$connect$GET(url)
162-
163-
purrr::map(
164-
list(res),
165-
~ purrr::list_modify(.x, app_guid = guid)
166-
)[[1]]
167-
},
168155
#' @description Terminate a single job for this content item.
169156
#' @param key The job key.
170157
register_job_kill_order = function(key) {
@@ -804,31 +791,6 @@ get_jobs <- function(content) {
804791
parse_connectapi_typed(jobs, connectapi_ptypes$jobs, strict = TRUE)
805792
}
806793

807-
# TODO: Need to test `logged_error` on a real error
808-
#'
809-
#' Retrieve details about a server process
810-
#' associated with a `content_item`, such as a FastAPI app or a Quarto render.
811-
#'
812-
#' @param content A Content object, as returned by `content_item()`
813-
#' @param key The key for a job
814-
#'
815-
#' @family job functions
816-
#' @family content functions
817-
#' @export
818-
get_job <- function(content, key) {
819-
lifecycle::deprecate_warn("0.6", "get_job()", "get_log()")
820-
scoped_experimental_silence()
821-
validate_R6_class(content, "Content")
822-
823-
job <- content$job(key = key)
824-
# protect against becoming a list...
825-
job$stdout <- strsplit(job$stdout, "\n")[[1]]
826-
job$stderr <- strsplit(job$stderr, "\n")[[1]]
827-
# a bit of an abuse
828-
# since stdout / stderr / logged_error are here now...
829-
parse_connectapi_typed(list(job), connectapi_ptypes$job)
830-
}
831-
832794
#' Terminate Jobs
833795
#'
834796
#' Register a job kill order for one or more jobs associated with a content

R/ptype.R

Lines changed: 0 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -194,25 +194,6 @@ connectapi_ptypes <- list(
194194
image = NA_character_,
195195
run_as = NA_character_,
196196
),
197-
job = tibble::tibble(
198-
pid = NA_integer_,
199-
key = NA_character_,
200-
app_id = NA_integer_,
201-
variant_id = NA_integer_,
202-
bundle_id = NA_integer_,
203-
tag = NA_character_,
204-
finalized = NA,
205-
hostname = NA_character_,
206-
origin = NA_character_,
207-
stdout = NA_list_,
208-
stderr = NA_list_,
209-
logged_error = NA_list_,
210-
start_time = NA_datetime_,
211-
end_time = NA_datetime_,
212-
exit_code = NA_integer_,
213-
app_guid = NA_character_,
214-
variant_key = NA_character_
215-
),
216197
bundles = tibble::tibble(
217198
id = NA_character_,
218199
content_guid = NA_character_,

R/variant.R

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -149,15 +149,6 @@ Variant <- R6::R6Class(
149149
~ purrr::list_modify(.x, variant_key = self$key)
150150
)
151151
},
152-
#' @description Return single job for this variant.
153-
#' @param key The job key.
154-
job = function(key) {
155-
pre_job <- super$job(key = key)
156-
purrr::map(
157-
list(pre_job),
158-
~ purrr::list_modify(.x, variant_key = self$key)
159-
)[[1]]
160-
},
161152
#' @description Return the URL for this variant.
162153
get_url = function() {
163154
base_content <- super$get_url()

man/Content.Rd

Lines changed: 0 additions & 18 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

man/ContentTask.Rd

Lines changed: 0 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

man/EnvironmentR6.Rd

Lines changed: 0 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

man/Vanity.Rd

Lines changed: 0 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

man/VariantR6.Rd

Lines changed: 0 additions & 18 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)