Skip to content

Commit

Permalink
Fix part of oppia#4374: Add docstring to file core.storage.job.gae_mo…
Browse files Browse the repository at this point in the history
…dels.py (oppia#4705)

* Added missing docstrings in file: core/storage/job/gae_models.py

* Added missing docstrings in file: core/storage/job/gae_models.py and corrected formatting errors.

* Add docstring at line 91 in file core.storage.job.gae_models, all tests passed.

* Indented at line 96.

* Changed the description to what was was suggested by @seanlip.

* Changed description to 'Whether the job's status_code is..
  • Loading branch information
divyadeep1 authored and apb7 committed Feb 19, 2018
1 parent 78995f7 commit a259788
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions core/storage/job/gae_models.py
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,11 @@ def get_new_id(cls, entity_name):

@property
def is_cancelable(self):
"""Checks if the job is cancelable.
Returns:
bool. Whether the job's status_code is 'queued' or 'started'.
"""
# Whether the job is currently in 'queued' or 'started' status.
return self.status_code in [STATUS_CODE_QUEUED, STATUS_CODE_STARTED]

Expand Down

0 comments on commit a259788

Please sign in to comment.