Skip to content

Commit f34667d

Browse files
committed
new substatus async integ tests. can_cancel can now be modified by an organizer on the client. cancel request returns no response body.
1 parent 58ffe42 commit f34667d

File tree

3 files changed

+790
-9
lines changed

3 files changed

+790
-9
lines changed

synapseclient/models/submission.py

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -699,16 +699,12 @@ async def cancel_submission_example():
699699
if not self.id:
700700
raise ValueError("The submission must have an ID to cancel.")
701701

702-
response = await evaluation_services.cancel_submission(
702+
await evaluation_services.cancel_submission(
703703
submission_id=self.id, synapse_client=synapse_client
704704
)
705705

706706
from synapseclient import Synapse
707707

708708
client = Synapse.get_client(synapse_client=synapse_client)
709709
logger = client.logger
710-
logger.info(f"Submission {self.id} has successfully been cancelled.")
711-
712-
# Update this object with the response
713-
self.fill_from_dict(response)
714-
return self
710+
logger.info(f"A request to cancel Submission {self.id} has been submitted.")

synapseclient/models/submission_status.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -400,10 +400,10 @@ class SubmissionStatus(
400400
A version of the status, auto-generated and auto-incremented by the system and read-only to the client.
401401
"""
402402

403-
can_cancel: Optional[bool] = field(default=False, compare=False)
403+
can_cancel: Optional[bool] = field(default=False)
404404
"""
405-
Can this submission be cancelled? By default, this will be set to False. Users can read this value.
406-
Only the queue's scoring application can change this value.
405+
Can this submission be cancelled? By default, this will be set to False. Submission owner can read this value.
406+
Only the queue's organizers can change this value.
407407
"""
408408

409409
cancel_requested: Optional[bool] = field(default=False, compare=False)

0 commit comments

Comments
 (0)