Skip to content

Conversation

@SurferJeffAtGoogle
Copy link
Contributor

If the first attempt at posting a message fails.

This means one fewer error that the user has to read, figure out, and fix.

$client = $app['google_client'];
$projectName = sprintf('projects/%s', $app['project_id']);
$pubsub = new Google_Service_Pubsub($client);
$topic = new \Google_Service_Pubsub_Topic();
Copy link
Contributor

@bshaffer bshaffer Jun 14, 2016

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The starting backslash is not required here, or on any of the classes below, since there is no namespace declared at the top of this file.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done.

@tmatsuo
Copy link
Contributor

tmatsuo commented Jun 14, 2016

LGTM

self.message = null;
}).error(function(data, status) {
self.logger.error('Failed to send the message. Status: ' + status + '.');
if (!self.createdTopicAndSubscription) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Shouldn't this be hasAttemptedToCreateTopicAndSubscription?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done.

If the first attempt at posting a message fails.
@SurferJeffAtGoogle SurferJeffAtGoogle merged commit 74871e6 into master Jun 14, 2016
@SurferJeffAtGoogle SurferJeffAtGoogle deleted the pubsubAutoCreate branch June 14, 2016 20:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants