Skip to content

Commit

Permalink
feat: im admin token cache
Browse files Browse the repository at this point in the history
  • Loading branch information
withchao committed Oct 25, 2023
1 parent 5b7f104 commit 95435d6
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions pkg/common/apicall/call.go
Original file line number Diff line number Diff line change
Expand Up @@ -69,10 +69,9 @@ func (a caller[Req, Resp]) Call(ctx context.Context, req *Req) (*Resp, error) {

func (a caller[Req, Resp]) call(ctx context.Context, req *Req) (*Resp, error) {
url := a.prefix() + a.api
start := time.Now()
defer func() {
log.ZDebug(ctx, "call caller", "api", a.api, "cost", time.Since(start))
}()
defer func(start time.Time) {
log.ZDebug(ctx, "api call caller time", "api", a.api, "cost", time.Since(start).String())
}(time.Now())
log.ZInfo(ctx, "caller req", "addr", url, "req", req)
reqBody, err := json.Marshal(req)
if err != nil {
Expand Down

0 comments on commit 95435d6

Please sign in to comment.