def __add_task(_user: UserInfo): _account = IosAccountInfo.objects.filter( account=_user.account).first() # type:IosAccountInfo _project = IosProjectInfo.objects.filter( project=_user.project).first() # type:IosProjectInfo _profile = IosProfileInfo.objects.filter( sid="%s:%s" % (_user.account, _user.project)).first() # type:IosProfileInfo Assert(_profile, "[%s][%s]证书无效" % (_project.project, _account.account)) Log("[%s]发布任务[%s]" % (_user.project, _user.account)) db_session.publish( "task:package", json_str({ "cert": "iPhone Developer: zhangming luo", "cert_p12": "", "mp_url": entry("/apple/download_mp?uuid=%s" % _user.uuid), "mp_md5": md5bytes(base64decode(_profile.profile)), "project": _project.project, "ipa_url": _asset_url("%s/orig.ipa" % _user.project), "ipa_md5": _project.md5sum, "ipa_new": "%s_%s.ipa" % (_account.team_id, _account.devices_num), "upload_url": entry("/apple/upload_ipa?project=%s&account=%s" % (_user.project, _user.account)), "ts": now(), }))
def publish_security_code(account: str, code: str, ts: int): db_session.publish( "account:security:code", json_str({ "account": account, "code": code, "ts": ts, }))