def machine_request_error(task_uuid, machine_request_id): logger.info("machine_request_id=%s" % machine_request_id) logger.info("task_uuid=%s" % task_uuid) result = app.AsyncResult(task_uuid) with allow_join_result(): exc = result.get(propagate=False) err_str = "ERROR - %r Exception:%r" % (result.result, result.traceback) logger.error(err_str) send_image_request_failed_email(machine_request, err_str) machine_request = MachineRequest.objects.get(id=machine_request_id) machine_request.status = err_str machine_request.save()
def machine_request_error(task_uuid, machine_request_id): celery_logger.info("machine_request_id=%s" % machine_request_id) celery_logger.info("task_uuid=%s" % task_uuid) machine_request = MachineRequest.objects.get(id=machine_request_id) result = app.AsyncResult(task_uuid) with allow_join_result(): exc = result.get(propagate=False) err_str = _status_to_error(machine_request.old_status, result.result, result.traceback) celery_logger.error(err_str) send_image_request_failed_email(machine_request, err_str) machine_request = MachineRequest.objects.get(id=machine_request_id) machine_request.old_status = err_str machine_request.save()
def machine_request_error(task_uuid, machine_request_id): logger.info("machine_request_id=%s" % machine_request_id) logger.info("task_uuid=%s" % task_uuid) result = app.AsyncResult(task_uuid) with allow_join_result(): exc = result.get(propagate=False) err_str = "ERROR - %r Exception:%r" % ( result.result, result.traceback, ) logger.error(err_str) send_image_request_failed_email(machine_request, err_str) machine_request = MachineRequest.objects.get(id=machine_request_id) machine_request.status = err_str machine_request.save()
def machine_request_error(task_request, *args, **kwargs): #Args format: (exception, ?, subtask_args...) exception = args[0] machine_request_id = args[2] task_uuid = task_request.id celery_logger.info("machine_request_id=%s" % machine_request_id) celery_logger.info("task_uuid=%s" % (task_uuid,) ) celery_logger.info("exception=%s" % (exception,) ) celery_logger.info("task_kwargs=%s" % kwargs) machine_request = MachineRequest.objects.get(id=machine_request_id) result = app.AsyncResult(task_uuid) with allow_join_result(): exc = result.get(propagate=False) err_str = _status_to_error(machine_request.old_status, result.result, result.traceback) celery_logger.error(err_str) send_image_request_failed_email(machine_request, err_str) machine_request = MachineRequest.objects.get(id=machine_request_id) machine_request.old_status = err_str machine_request.save()
def machine_request_error(task_request, *args, **kwargs): #Args format: (exception, ?, subtask_args...) exception = args[0] machine_request_id = args[2] task_uuid = task_request.id celery_logger.info("machine_request_id=%s" % machine_request_id) celery_logger.info("task_uuid=%s" % (task_uuid,) ) celery_logger.info("exception=%s" % (exception,) ) celery_logger.info("task_kwargs=%s" % kwargs) machine_request = MachineRequest.objects.get(id=machine_request_id) result = app.AsyncResult(task_uuid) with allow_join_result(): exc = result.get(propagate=False) err_str = _status_to_error(machine_request.old_status, result.result, result.traceback) celery_logger.info("traceback=%s" % (result.traceback,) ) celery_logger.error(err_str) machine_request = MachineRequest.objects.get(id=machine_request_id) machine_request.old_status = err_str machine_request.save() send_image_request_failed_email(machine_request, err_str)