Skip to content

Commit

Permalink
Merge pull request #94 from rusenask/develop
Browse files Browse the repository at this point in the history
Develop
  • Loading branch information
rusenask authored Aug 23, 2017
2 parents 82491df + 1539d42 commit ee5bdc3
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions trigger/pubsub/pubsub.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,12 @@ import (
"fmt"
"time"

"net"

"cloud.google.com/go/pubsub"
"golang.org/x/net/context"
"google.golang.org/api/option"
"google.golang.org/grpc"
"net"

"github.com/rusenask/keel/provider"
"github.com/rusenask/keel/types"
Expand Down Expand Up @@ -106,7 +107,10 @@ func (s *PubsubSubscriber) ensureSubscription(ctx context.Context, subscriptionI
Topic: s.client.Topic(topicID),
AckDeadline: 10 * time.Second,
})
return fmt.Errorf("failed to create subscription %s, error: %s", subscriptionID, err)
if err != nil {
return fmt.Errorf("failed to create subscription %s, error: %s", subscriptionID, err)
}
return nil
}

// Subscribe - initiate PubsubSubscriber
Expand Down

0 comments on commit ee5bdc3

Please sign in to comment.