Method: SDM::WorkflowRoles#create
- Defined in:
- lib/svc.rb
#create(workflow_role, deadline: nil) ⇒ Object
Create creates a new workflow role
6894 6895 6896 6897 6898 6899 6900 6901 6902 6903 6904 6905 6906 6907 6908 6909 6910 6911 6912 6913 6914 6915 6916 6917 6918 6919 6920 |
# File 'lib/svc.rb', line 6894 def create( workflow_role, deadline: nil ) req = V1::WorkflowRolesCreateRequest.new() req.workflow_role = Plumbing::convert_workflow_role_to_plumbing(workflow_role) tries = 0 plumbing_response = nil loop do begin plumbing_response = @stub.create(req, metadata: @parent.("WorkflowRoles.Create", req), deadline: deadline) rescue => exception if (@parent.shouldRetry(tries, exception)) tries + +@parent.jitterSleep(tries) next end raise Plumbing::convert_error_to_porcelain(exception) end break end resp = WorkflowRolesCreateResponse.new() resp.rate_limit = Plumbing::(plumbing_response.rate_limit) resp.workflow_role = Plumbing::convert_workflow_role_to_porcelain(plumbing_response.workflow_role) resp end |