Exemplo n.º 1
0
    def action_cancel_operation(self, login, password, status_id):
        operation = OperationStatus.load(status_id.decode('UTF-8'))

        return self.get_process_data(CancelOperation, {
            "login": login.decode('UTF-8'),
            "password": password.decode('UTF-8'),
            "pid": operation.pid,
            "pname": operation.pname
        })
Exemplo n.º 2
0
 def async_on_abort(op_status_id, data=None, progress=None, pid=None, pname=None):
     logger.info("Process on_abort()")
     operation = OperationStatus.load(op_status_id)
     data = {
         'id': op_status_id,
         'status': OperationStatus.STATUS_ABORT,
         'data': data,
         'progress': progress,
         'pid': pid,
         'pname': pname
     }
     operation.set_attributes(data)
     operation.save()
Exemplo n.º 3
0
 def async_on_error(op_status_id, data=None, progress=None, pid=None, pname=None):
     logger.info("Process on_error()")
     operation = OperationStatus.load(op_status_id)
     data = {
         'id': status_id,
         'status': 'error',
         'data': data,
         'progress': progress,
         'pid': pid,
         'pname': pname
     }
     operation.set_attributes(data)
     operation.save()
Exemplo n.º 4
0
 def async_on_abort(op_status_id, data=None, progress=None, pid=None, pname=None):
     logger.info("Process on_abort()")
     operation = OperationStatus.load(op_status_id)
     data = {
         'id': op_status_id,
         'status': OperationStatus.STATUS_ABORT,
         'data': data,
         'progress': progress,
         'pid': pid,
         'pname': pname
     }
     operation.set_attributes(data)
     operation.save()
Exemplo n.º 5
0
 def async_on_error(op_status_id, data=None, progress=None, pid=None, pname=None):
     logger.info("Process on_error()")
     operation = OperationStatus.load(op_status_id)
     data = {
         'id': status_id,
         'status': 'error',
         'data': data,
         'progress': progress,
         'pid': pid,
         'pname': pname
     }
     operation.set_attributes(data)
     operation.save()
Exemplo n.º 6
0
 def async_check_operation(op_status_id):
     operation = OperationStatus.load(op_status_id)
     logger.info("Operation id='%s' status is '%s'" %
                 (str(status_id), operation.status))
     if operation.status != OperationStatus.STATUS_WAIT:
         raise Error("Operation status is not wait - aborting")
Exemplo n.º 7
0
 def async_check_operation(op_status_id):
     operation = OperationStatus.load(op_status_id)
     logger.info("Operation id='%s' status is '%s'" % (str(status_id), operation.status))
     if operation.status != OperationStatus.STATUS_WAIT:
         raise Error("Operation status is not wait - aborting")