Skip to content

Commit 2564ba4

Browse files
authored
record submission needs to be removed (#159)
1 parent 97d2965 commit 2564ba4

1 file changed

Lines changed: 3 additions & 12 deletions

File tree

indico/queries/workflow.py

Lines changed: 3 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -212,7 +212,6 @@ class _WorkflowSubmission(GraphQLRequest):
212212
mutation_args = {
213213
"workflowId": "Int!",
214214
"files": "[FileInput]!",
215-
"recordSubmission": "Boolean",
216215
"bundle": "Boolean",
217216
"resultVersion": "SubmissionResultVersion",
218217
}
@@ -223,7 +222,6 @@ def __init__(
223222
**kwargs,
224223
):
225224
self.workflow_id = kwargs["workflow_id"]
226-
self.record_submission = True #record_submission is deprecated entirely.
227225

228226
# construct mutation signature and args based on provided kwargs to ensure
229227
# backwards-compatible graphql calls
@@ -257,10 +255,10 @@ def process_response(self, response):
257255
response = super().process_response(response)[self.mutation_name]
258256
if "submissions" in response:
259257
return [Submission(**s) for s in response["submissions"]]
260-
elif self.record_submission:
261-
return response["submissionIds"]
262-
elif not response["jobIds"]:
258+
if not response["submissionIds"]:
263259
raise IndicoError(f"Failed to submit to workflow {self.workflow_id}")
260+
else:
261+
return response["submissionIds"]
264262
return [Job(id=job_id) for job_id in response["jobIds"]]
265263

266264

@@ -280,10 +278,6 @@ class WorkflowSubmission(RequestChain):
280278
files (List[str], optional): List of local file paths to submit
281279
urls (List[str], optional): List of urls to submit
282280
submission (bool, optional): DEPRECATED - AsyncJobs are no longer supported.
283-
Process these files as normal submissions.
284-
Defaults to True.
285-
If False, files will be processed as AsyncJobs, ignoring any workflow
286-
post-processing steps like Review and with no record in the system
287281
bundle (bool, optional): Batch all files under a single submission id
288282
result_version (str, optional):
289283
The format of the submission result file. One of:
@@ -338,7 +332,6 @@ def requests(self):
338332
yield _WorkflowSubmission(
339333
self.detailed_response,
340334
workflow_id=self.workflow_id,
341-
record_submission=self.submission,
342335
files=self.previous,
343336
bundle=self.bundle,
344337
result_version=self.result_version,
@@ -347,7 +340,6 @@ def requests(self):
347340
yield _WorkflowUrlSubmission(
348341
self.detailed_response,
349342
workflow_id=self.workflow_id,
350-
record_submission=self.submission,
351343
urls=self.urls,
352344
bundle=self.bundle,
353345
result_version=self.result_version,
@@ -357,7 +349,6 @@ def requests(self):
357349
yield _WorkflowSubmission(
358350
self.detailed_response,
359351
workflow_id=self.workflow_id,
360-
record_submission=self.submission,
361352
files=self.previous,
362353
bundle=self.bundle,
363354
result_version=self.result_version,

0 commit comments

Comments
 (0)