'Completes stage and process percents, stamps end time.'

def mark_as_completed(self, stage_status=None, notes=None):

    logging.debug(('Completing    process    %s' % self.process_name))
    self.stage_percent = 1.0
    self.process_percent = 1.0
    self.current_stage = self.total_stages
    self.end_time = datetime.datetime.now()
    self.stage_status = (stage_status or self.stage_status)
    self.completed = True
    self.notes = notes
    self.save()
