Skip to content

Commit c11be59

Browse files
authored
Add ratelimiter to QueryWorkflow API (cadence-workflow#3735)
1 parent 995c4dc commit c11be59

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

service/frontend/workflowHandler.go

+4
Original file line numberDiff line numberDiff line change
@@ -3076,6 +3076,10 @@ func (wh *WorkflowHandler) QueryWorkflow(
30763076
return nil, wh.error(errQueryDisallowedForDomain, scope, getWfIDRunIDTags(wfExecution)...)
30773077
}
30783078

3079+
if ok := wh.allow(queryRequest); !ok {
3080+
return nil, wh.error(createServiceBusyError(), scope)
3081+
}
3082+
30793083
if err := wh.versionChecker.ClientSupported(ctx, wh.config.EnableClientVersionCheck()); err != nil {
30803084
return nil, wh.error(err, scope, getWfIDRunIDTags(wfExecution)...)
30813085
}

0 commit comments

Comments
 (0)