'Handler called if the task times out.'

def on_timeout(self, soft, timeout):

    task_ready(self)
    if soft:
        warn(u'Soft    time    limit    (%ss)    exceeded    for    %s[%s]', timeout, self.name, self.id)
        exc = SoftTimeLimitExceeded(soft)
    else:
        error(u'Hard    time    limit    (%ss)    exceeded    for    %s[%s]', timeout, self.name, self.id)
        exc = TimeLimitExceeded(timeout)
    self.task.backend.mark_as_failure(self.id, exc, request=self, store_result=self.store_errors)
    if self.task.acks_late:
        self.acknowledge()
