diff --git a/fir_ser/api/utils/app/iossignapi.py b/fir_ser/api/utils/app/iossignapi.py index d9711e3..f8d6329 100644 --- a/fir_ser/api/utils/app/iossignapi.py +++ b/fir_ser/api/utils/app/iossignapi.py @@ -73,7 +73,7 @@ class AppDeveloperApi(object): def get_profile(self, bundleId, app_id, device_udid, device_name, provisionName): self.cmd = self.cmd + " profile add '%s' '%s' '%s' '%s' '%s' '%s'" % ( bundleId, app_id, device_udid, device_name, self.certid, provisionName) - result = exec_shell(self.cmd) + return exec_shell(self.cmd) def del_profile(self, bundleId, app_id): self.cmd = self.cmd + " profile del '%s' '%s'" % (bundleId, app_id) diff --git a/fir_ser/api/utils/app/supersignutils.py b/fir_ser/api/utils/app/supersignutils.py index b6f5bd7..d5f3c60 100644 --- a/fir_ser/api/utils/app/supersignutils.py +++ b/fir_ser/api/utils/app/supersignutils.py @@ -156,7 +156,7 @@ class IosUtils(object): app_id = self.app_obj.app_id device_udid = self.udid_info.get('udid') device_name = self.udid_info.get('product') - app_api_obj.get_profile(bundleId, app_id, device_udid, device_name, self.get_profile_full_path()) + return app_api_obj.get_profile(bundleId, app_id, device_udid, device_name, self.get_profile_full_path()) def get_profile_full_path(self): cert_dir_name = make_app_uuid(self.user_obj, self.auth.get("username")) @@ -175,7 +175,13 @@ class IosUtils(object): logger.info("udid %s exists app_id %s" % (self.udid_info.get('udid'), self.app_obj)) return logger.info("udid %s not exists app_id %s ,need sign" % (self.udid_info.get('udid'), self.app_obj)) - self.download_profile() + status, result = self.download_profile() + if not status: + logger.error("udid %s app %s developer %s sign failed %s" % ( + self.udid_info.get('udid'), self.app_obj, self.developer_obj, result)) + self.developer_obj.is_actived = False + self.developer_obj.save() + return file_format_path_name = file_format_path(self.user_obj, self.auth) my_local_key = file_format_path_name + ".key" diff --git a/fir_ser/uwsgi.conf b/fir_ser/uwsgi.conf index 361587d..c069cfb 100644 --- a/fir_ser/uwsgi.conf +++ b/fir_ser/uwsgi.conf @@ -23,6 +23,7 @@ threads = 4 #monitor uwsgi status 通过该端口可以监控 uwsgi 的负载情况 stats = 127.0.0.1:9191 +# 如果以nginx用户运行,则需要授权 ruby 权限 chmod ug+s /usr/local/rvm/rubies/ruby-2.7.0/bin/ruby /usr/bin/isign 否则,会导致登录信息保存失败 uid=nginx gid=nginx