Skip to content

Commit cff228a

Browse files
authored
Merge pull request #1135 from code0-tech/hotfix/update-each-flow-individually
update each flow individually to dodge grpc message size
2 parents f6a9939 + 15d54c1 commit cff228a

1 file changed

Lines changed: 10 additions & 8 deletions

File tree

app/grpc/flow_handler.rb

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -30,22 +30,24 @@ def self.update_runtime(runtime)
3030
)
3131
runtime_modules = runtime.runtime_modules.includes(:module_configuration_definitions)
3232

33-
flows = []
34-
assignments.each do |assignment|
35-
assignment.namespace_project.flows.validation_status_valid.each do |flow|
36-
flows << flow.to_grpc
37-
end
38-
end
39-
4033
send_update(
4134
Tucana::Sagittarius::FlowResponse.new(
4235
flows: Tucana::Shared::Flows.new(
43-
flows: flows
36+
flows: []
4437
)
4538
),
4639
runtime.id
4740
)
4841

42+
assignments.each do |assignment|
43+
assignment.namespace_project.flows.validation_status_valid.each do |flow|
44+
send_update(
45+
Tucana::Sagittarius::FlowResponse.new(updated_flow: flow.to_grpc),
46+
runtime.id
47+
)
48+
end
49+
end
50+
4951
grouped_module_configurations(assignments, runtime_modules).each do |module_configuration|
5052
send_update(
5153
Tucana::Sagittarius::FlowResponse.new(

0 commit comments

Comments
 (0)