
class Task(object):
    STATUS_PREPARE = 'prepare'
    STATUS_READY = 'ready'
    STATUS_RUNNING = 'running'
    STATUS_FINISHED = 'finished'
    STATUS_FAILED = 'failed'
    STATUS_CANCELLED = 'cancelled'

    all_statuses = [
        STATUS_PREPARE, STATUS_READY, STATUS_RUNNING, STATUS_FINISHED, STATUS_FAILED, STATUS_CANCELLED
    ]

    def __init__(self, task_id, task_dir):
        """
        :type task_id: str | unicode 
        """
        self._task_id = task_id
        self._task_dir = task_dir

    @property
    def task_id(self):
        """
        :rtype: str | unicode 
        """
        return self._task_id

    @property
    def task_dir(self):
        """
        :rtype: str | unicode 
        """
        return self._task_dir
