Log instance IDs in internal channel callbacks.
This commit is contained in:
@@ -29,6 +29,7 @@ class OnChannelConnect(webapp2.RequestHandler):
|
|||||||
@db.transactional()
|
@db.transactional()
|
||||||
def post(self):
|
def post(self):
|
||||||
instance_id = self.request.get('from')
|
instance_id = self.request.get('from')
|
||||||
|
logging.info('Instance: %s', instance_id)
|
||||||
instance = models.Instance.FromID(instance_id)
|
instance = models.Instance.FromID(instance_id)
|
||||||
if not instance:
|
if not instance:
|
||||||
logging.warning('Channel opened with invalid instance_id: %s', instance_id)
|
logging.warning('Channel opened with invalid instance_id: %s', instance_id)
|
||||||
@@ -46,6 +47,7 @@ class OnChannelDisconnect(webapp2.RequestHandler):
|
|||||||
@utils.local_namespace
|
@utils.local_namespace
|
||||||
def post(self):
|
def post(self):
|
||||||
instance_id = self.request.get('from')
|
instance_id = self.request.get('from')
|
||||||
|
logging.info('Instance: %s', instance_id)
|
||||||
instance_key = db.Key.from_path('Instance', instance_id)
|
instance_key = db.Key.from_path('Instance', instance_id)
|
||||||
|
|
||||||
subscriptions = list(models.Subscription.all().filter('instance =', instance_key))
|
subscriptions = list(models.Subscription.all().filter('instance =', instance_key))
|
||||||
|
|||||||
Reference in New Issue
Block a user