处理死锁
This commit is contained in:
parent
53046a939a
commit
81366d0edd
|
@ -23,5 +23,5 @@ public interface GitService {
|
|||
|
||||
void deleteBranch(String owner,String projectName ,String branchName) throws Exception;
|
||||
|
||||
Map getUserInfo() throws Exception;
|
||||
Map getUserInfo(String token) throws Exception;
|
||||
}
|
||||
|
|
|
@ -81,7 +81,7 @@ public class GitServiceImpl implements GitService {
|
|||
token = jedis.get(ci4sUsername + "_gitToken");
|
||||
} else {
|
||||
try {
|
||||
Map userInfo = getUserInfo();
|
||||
Map userInfo = getUserInfo(token);
|
||||
if (userInfo == null || (userInfo.get("status") != null && 401 == (Integer) userInfo.get("status"))) {
|
||||
login(gitLinkUsername, gitLinkPassword);
|
||||
token = jedis.get(ci4sUsername + "_gitToken");
|
||||
|
@ -152,8 +152,7 @@ public class GitServiceImpl implements GitService {
|
|||
}
|
||||
|
||||
@Override
|
||||
public Map getUserInfo() throws Exception {
|
||||
String token = this.checkoutToken();
|
||||
public Map getUserInfo(String token) throws Exception {
|
||||
String userReq = HttpUtils.sendGetWithToken("https://www.gitlink.org.cn/api/users/get_user_info.json",null, token);
|
||||
if (StringUtils.isEmpty(userReq)){
|
||||
return null;
|
||||
|
|
Loading…
Reference in New Issue