GetRefreshExternalCollectionProgress()
Retrieves the state and progress of a refresh-external-collection job.
pub async fn get_refresh_external_collection_progress(&self, request: GetRefreshExternalCollectionProgressRequest) -> Result<GetRefreshExternalCollectionProgressResponse>
Request Syntax
let request = GetRefreshExternalCollectionProgressRequest::builder()
.job_id(job_id)
.build()?;
REQUEST FIELDS:
job_id: i64Identifier of the refresh job, as returned by RefreshExternalCollection. Must be greater than zero.
RETURN TYPE:
Result
RETURNS:
A GetRefreshExternalCollectionProgressResponse containing the refresh job information. Returns an Error if the operation fails.
GetRefreshExternalCollectionProgressResponse
job_info() // -> &RefreshExternalCollectionJobInfo
METHODS:
job_info()(&RefreshExternalCollectionJobInfo) -The refresh job information.
get_job_id()(i64) -The ID of the refresh job.
get_collection_name()(&str) -The name of the refreshed collection.
get_state()(RefreshExternalCollectionStateCode) -The state of the refresh job.
get_progress()(i32) -The progress of the refresh job.
get_reason()(&str) -The failure reason, when the job failed.
get_external_source()(&str) -The external source of the refreshed data.
get_start_time()(u64) -The start time of the refresh job.
get_end_time()(u64) -
Example
let request = GetRefreshExternalCollectionProgressRequest::builder()
.job_id(job_id)
.build()?;
let resp = client.get_refresh_external_collection_progress(request).await?;
println!("state: {:?}", resp.job_info().get_state());