Skip to content

Commit

Permalink
fix ApiController#getResourceTableV2 (#162)
Browse files Browse the repository at this point in the history
  • Loading branch information
caojiajun committed Nov 21, 2023
1 parent fa77429 commit 031b5b7
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,9 @@ public CamelliaApiResponse getResourceTable(@RequestParam("bid") Long bid,

@ApiOperation(value = "获取资源表", notes = "这是一个心跳接口,客户端定时来拉取(如5s),通过MD5值判断是否有更新")
@GetMapping(value = "/v2/resourceTable")
public CamelliaApiV2Response getResourceTableV2(Long bid, String bgroup, String md5) {
public CamelliaApiV2Response getResourceTableV2(@RequestParam("bid") Long bid,
@RequestParam("bgroup") String bgroup,
@RequestParam(value = "md5", required = false) String md5) {
LogBean.get().addProps("bid", bid);
LogBean.get().addProps("bgroup", bgroup);
LogBean.get().addProps("md5", md5);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,7 @@
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.concurrent.*;

Expand Down Expand Up @@ -109,7 +107,7 @@ public CompletableFuture<T> getOrInitialize(K key) {
}
}
} catch (Exception e) {
logger.error("initialize error, key = {}", keyStr);
logger.error("initialize error, key = {}", keyStr, e);
synchronized (lockMap.getLockObj(keyStr)) {
clearFutureQueue(keyStr, null);
}
Expand Down Expand Up @@ -173,7 +171,7 @@ private void clear(String keyStr, DynamicCapacityLinkedBlockingQueue<Completable
try {
completableFuture.complete(value);
} catch (Exception e) {
logger.error("complete error, key = {}", keyStr);
logger.error("complete error, key = {}", keyStr, e);
}
completableFuture = queue.poll();
}
Expand Down

0 comments on commit 031b5b7

Please sign in to comment.