Retrying a Failed Submission
Given a list of submission_ids, retry those failed submissions.
Introduction
If your Submission(s) end up with a status of FAILED the RetrySubmission query can be used to retry those failed submissions. This can be helpful if there are intermittent issues with a file, or a submission is stuck in PROCESSING.
RetrySubmission
Inputs
RetrySubmission Inputs
submission_ids: List[int]The given submission ids to retry.
Outputs
RetrySubmission Outputs
retries: list[SubmissionRetry]List of of previous submission attempts containing the following information:
id: inta retry attempt id
retryErrors: strerrors on retry
submissionId: intid of the submission
Try It Out
You can try outRetrySubmission below:
from indico.queries import RetrySubmission
# submission id to retry, must be a list even if a single id is provided
submission_ids = [4]
retries = client.call(RetrySubmission(submission_ids=submission_ids))package com.indico;
import com.indico.entity.Submission;
import com.indico.mutation.RetrySubmission;
import java.util.*;
public class main {
public IndicoClient client;
private static String token_path = "./indico_api_token.txt";
private static String host = "mycluster.indico.io"
private static Integer failed_submission_id = 1;
public static void main(String args[]) throws Exception {
IndicoConfig config = new IndicoConfig.Builder().host(host)
.protocol("https")
.tokenPath(token_path)
.build();
client = new IndicoKtorClient(config);
List<Integer> failed_ids = new ArrayList<Integer>();
failed_ids.add(failed_submission_id);
RetrySubmission retrySubmissionQuery = client.retrySubmission();
retrySubmissionQuery.ids(failed_ids);
List<SubmissionRetries> retryResults = retrySubmissionQuery.execute();
System.out.println("Retried " + retryResults.size() + " submissions");
System.exit(0);
}
}Updated 5 months ago
