Skip to content

Commit

Permalink
Add ratelimiter to QueryWorkflow API (cadence-workflow#3735)
Browse files Browse the repository at this point in the history
  • Loading branch information
anish531213 authored Nov 5, 2020
1 parent 995c4dc commit c11be59
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions service/frontend/workflowHandler.go
Original file line number Diff line number Diff line change
Expand Up @@ -3076,6 +3076,10 @@ func (wh *WorkflowHandler) QueryWorkflow(
return nil, wh.error(errQueryDisallowedForDomain, scope, getWfIDRunIDTags(wfExecution)...)
}

if ok := wh.allow(queryRequest); !ok {
return nil, wh.error(createServiceBusyError(), scope)
}

if err := wh.versionChecker.ClientSupported(ctx, wh.config.EnableClientVersionCheck()); err != nil {
return nil, wh.error(err, scope, getWfIDRunIDTags(wfExecution)...)
}
Expand Down

0 comments on commit c11be59

Please sign in to comment.