% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/api_requests.R
\name{abba_submit_and_get_log}
\alias{abba_submit_and_get_log}
\title{Send job and poll for status. This function sends multiple requests so it
won't time out on heavy jobs}
\usage{
abba_submit_and_get_log(
  file_path,
  batch_group_id = "",
  user_tag = "",
  cpu_limit = 1L,
  memory_limit = "512M",
  container = "",
  mounts = "",
  auto_mount_home = FALSE,
  home_nfs_ip_address = getOption("abba.home.nfs.ip.address"),
  poll_interval_seconds = 3,
  timeout_seconds = 600,
  api_address = Sys.getenv("ABBA_API_ADDRESS"),
  api_key = Sys.getenv("ABBA_API_KEY")
)
}
\arguments{
\item{file_path}{Full path to R file}

\item{batch_group_id}{Group ID for batch processing}

\item{user_tag}{Optional; a string that describes what kind of job will be
scheduled to run}

\item{cpu_limit}{Maximum number of cores available for Kubernetes container}

\item{memory_limit}{Maximum amount of RAM available for Kubernetes container}

\item{container}{list that contains container name and image name}

\item{mounts}{Specifically formatted list with information bout volumes that
container would have access to during the run}

\item{auto_mount_home}{set to TRUE to mount service user home directory}

\item{home_nfs_ip_address}{IP address for mounting service user home directory}

\item{poll_interval_seconds}{Total time to wait before timeout in seconds}

\item{timeout_seconds}{Total time to wait before timeout in seconds}

\item{api_address}{URL to send requests to, hosted in Posit Connect. Defaults
to environment variable ABBA_API_ADDRESS.}

\item{api_key}{API Key for accessing restricted endpoints. Defaults to
environment variable ABBA_API_KEY.}
}
\value{
list with 2 attributes: job_id for submitted job`s id, and its logs
}
\description{
Send job and poll for status. This function sends multiple requests so it
won't time out on heavy jobs
}
\examples{
\dontrun{
response <- abba_submit_and_get_log('/path/to/R/program.R', batch_group_id='SDTM')}
}
