# appengine_config.py | |
from google.appengine.ext import vendor | |
# Add any libraries install in the "lib" folder. | |
vendor.add('lib') |
import webapp2 | |
from google.cloud import pubsub | |
class WatchPage(webapp2.RequestHandler): | |
def get(self): | |
pubsub_client = pubsub.Client() | |
topic = pubsub_client.topic('timer-topic') | |
message_id = topic.publish('ping'.encode('utf-8')) | |
self.response.write(message_id) | |
app = webapp2.WSGIApplication([ | |
('/watch', WatchPage), | |
], debug=True) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment