'read all pages of deleted/expired tasks'

def read_all_history(self, type=0):

    all_tasks = []
    (tasks, next_link) = self.read_history_page(type)
    all_tasks.extend(tasks)
    while next_link:
        (tasks, next_link) = self.read_history_page_url(next_link)
        all_tasks.extend(tasks)
    for (i, task) in enumerate(all_tasks):
        task['#'] = i
    return all_tasks
