def set_status(self, status, **kwargs):
        changed_fields = ['status', 'updated_at']
        if status == 'error':
            self.problem = kwargs.get('problem')
            changed_fields.append('problem')

        self.status = status
        self.updated_at = timezone.now()
        self.save(update_fields=changed_fields)