'Construct a SubtaskStatus object.'

def __init__(self, task_id, attempted=None, succeeded=0, failed=0, skipped=0, retried_nomax=0, retried_withmax=0, state=None):

    self.task_id = task_id
    if (attempted is not None):
        self.attempted = attempted
    else:
        self.attempted = (succeeded + failed)
    self.succeeded = succeeded
    self.failed = failed
    self.skipped = skipped
    self.retried_nomax = retried_nomax
    self.retried_withmax = retried_withmax
    self.state = (state if (state is not None) else QUEUING)
