Skip to content

Commit

Permalink
fix server shutdown requested (#41)
Browse files Browse the repository at this point in the history
  • Loading branch information
lghinet authored May 19, 2023
1 parent 9b9c484 commit 54d87d3
Show file tree
Hide file tree
Showing 4 changed files with 24 additions and 34 deletions.
27 changes: 14 additions & 13 deletions examples/components/comp-nats.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,16 +6,17 @@ spec:
type: pubsub.natsstreaming
version: v1
metadata:
- name: natsURL
value: "nats://kube-worker1.totalsoft.local:31291"
- name: natsStreamingClusterID
value: "faas-cluster"
# below are subscription configuration.
- name: subscriptionType
value: queue # Required. Allowed values: topic, queue.
- name: ackWaitTime
value: "" # Optional.
- name: maxInFlight
value: "1" # Optional.
- name: durableSubscriptionName
value: "" # Optional.
- name: natsURL
value: "nats://kube-worker1:31291"
- name: natsStreamingClusterID
value: faas-cluster
- name: subscriptionType
value: queue
- name: connectWait
value: 10s
- name: ackWaitTime
value: 50s
- name: maxInFlight
value: '1'
- name: durableSubscriptionName
value: durable
11 changes: 0 additions & 11 deletions examples/components/config-api-pipeline.yaml

This file was deleted.

18 changes: 9 additions & 9 deletions examples/components/config-node-pipeline.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,14 @@ metadata:
spec:
metric:
enabled: true
tracing:
samplingRate: '1'
jaeger:
useAgent: false
collectorEndpointAddress: 'http://kube-worker1.totalsoft.local:31034/api/traces'
subscriberPipeline:
handlers:
- name: pubsub-uppercase
type: middleware.pubsub.uppercase
# tracing:
# samplingRate: '1'
# jaeger:
# useAgent: false
# collectorEndpointAddress: 'http://kube-worker1.totalsoft.local:31034/api/traces'
# subscriberPipeline:
# handlers:
# - name: pubsub-uppercase
# type: middleware.pubsub.uppercase
pubSub:
name: natsstreaming-pubsub
2 changes: 1 addition & 1 deletion pkg/api/runtime/grpc/grpc_api.go
Original file line number Diff line number Diff line change
Expand Up @@ -166,7 +166,7 @@ func (srv *rusiServerImpl) Subscribe(stream v1.Rusi_SubscribeServer) error {
if exit {
klog.V(4).InfoS("closing subscription stream", "topic", request.Topic, "error", err)
if errors.Is(err, context.Canceled) {
return nil
err = status.Error(codes.Aborted, "Cancellation requested")
}
return err
}
Expand Down

0 comments on commit 54d87d3

Please sign in to comment.