in source/setup/lambda/crhelper/resource_helper.py [0:0]
def _polling_init(self, event):
# Setup polling on initial request
logger.debug("pid1: %s" % self.PhysicalResourceId)
if 'CrHelperPoll' not in event.keys() and self.Status != FAILED:
logger.info("Setting up polling")
self.Data["PhysicalResourceId"] = self.PhysicalResourceId
self._setup_polling()
self.PhysicalResourceId = None
logger.debug("pid2: %s" % self.PhysicalResourceId)
# if physical id is set, or there was a failure then we're done
logger.debug("pid3: %s" % self.PhysicalResourceId)
if self.PhysicalResourceId or self.Status == FAILED:
logger.info("Polling complete, removing cwe schedule")
self._remove_polling()
self._send_response = True