优化异常注册逻辑,修复设置设备状态返回异常问题

dependabot/npm_and_yarn/fir_admin/async-2.6.4
nineven 2 years ago
parent ef243feb9f
commit 1d75c8ed23
  1. 2
      fir_client/vue.config.js
  2. 2
      fir_ser/xsign/utils/iossignapi.py
  3. 21
      fir_ser/xsign/utils/supersignutils.py

@ -82,7 +82,7 @@ if (page) {
} }
} }
const version='2.3.3'; const version='2.3.5';
const pro_base_env = { const pro_base_env = {
baseUrl: 'https://flyapps.cn', baseUrl: 'https://flyapps.cn',

@ -447,7 +447,7 @@ class AppDeveloperApiV2(object):
device_obj = apple_obj.disabled_device(device_id, device_name, device_udid) device_obj = apple_obj.disabled_device(device_id, device_name, device_udid)
logger.info(f"issuer_id:{self.issuer_id} device_obj:{device_obj} result:{status}") logger.info(f"issuer_id:{self.issuer_id} device_obj:{device_obj} result:{status}")
if device_obj and isinstance(device_obj, Devices): if device_obj and isinstance(device_obj, Devices):
return True, result return True, device_obj
raise Exception(str(device_obj)) raise Exception(str(device_obj))
except Exception as e: except Exception as e:
err_msg = str(e) err_msg = str(e)

@ -694,18 +694,18 @@ class IosUtils(object):
failed_call_prefix, failed_call_prefix,
set_failed_callback) set_failed_callback)
if not status: # 已经包含异常操作,暂定 if not status: # 已经包含异常操作,暂定
msg = result
sync_device_obj = UDIDsyncDeveloper.objects.filter(udid=device_udid, sync_device_obj = UDIDsyncDeveloper.objects.filter(udid=device_udid,
developerid=developer_obj, developerid=developer_obj,
status__in=[DeviceStatus.PROCESSING, status__in=[DeviceStatus.PROCESSING,
DeviceStatus.INELIGIBLE]).first() DeviceStatus.INELIGIBLE]).first()
if sync_device_obj: if sync_device_obj:
msg = result
change_developer_abnormal_status(developer_status, user_obj, developer_obj, app_obj) change_developer_abnormal_status(developer_status, user_obj, developer_obj, app_obj)
if UserConfig(user_obj).DEVELOPER_WAIT_ABNORMAL_DEVICE: if UserConfig(user_obj).DEVELOPER_WAIT_ABNORMAL_DEVICE:
update_or_create_abnormal_device(sync_device_obj, user_obj, app_obj, client_ip) update_or_create_abnormal_device(sync_device_obj, user_obj, app_obj, client_ip)
msg = 'DEVELOPER_WAIT_ABNORMAL_DEVICE' msg = 'DEVELOPER_WAIT_ABNORMAL_DEVICE'
return False, msg return False, msg
sync_device_obj.status = True sync_device_obj.status = result.statue
sync_device_obj.save(update_fields=['status']) sync_device_obj.save(update_fields=['status'])
else: else:
@ -801,12 +801,17 @@ class IosUtils(object):
if status: if status:
for device_obj in device_obj_list: for device_obj in device_obj_list:
if device_obj.status not in [DeviceStatus.ENABLED, DeviceStatus.DISABLED]: if device_obj.status not in [DeviceStatus.ENABLED, DeviceStatus.DISABLED]:
developer_obj.status = AppleDeveloperStatus.DEVICE_ABNORMAL
developer_obj.save(update_fields=['status'])
err_msg = f'issuer_id:{developer_obj.issuer_id} device status unexpected. device_obj:{device_obj}' err_msg = f'issuer_id:{developer_obj.issuer_id} device status unexpected. device_obj:{device_obj}'
add_sign_message(developer_obj.user_id, developer_obj, None, '开发者设备状态异常', if developer_obj.status != AppleDeveloperStatus.DEVICE_ABNORMAL:
err_msg, False) developer_obj.status = AppleDeveloperStatus.DEVICE_ABNORMAL
return False, err_msg developer_obj.save(update_fields=['status'])
add_sign_message(developer_obj.user_id, developer_obj, None, '开发者设备状态异常',
err_msg, False)
if serial:
if serial == device_obj.id:
return False, err_msg
else:
return False, err_msg
else: else:
if serial and serial == device_obj.id: if serial and serial == device_obj.id:
sync_device_obj, _ = update_or_create_developer_udid_info(device_obj, developer_obj) sync_device_obj, _ = update_or_create_developer_udid_info(device_obj, developer_obj)

Loading…
Cancel
Save