def post(self):
        session = data.Session.from_request(self.request)
        result, had_error = twitterappengine.exec_twitter_api(
            lambda: update_timeline(session),
            error_detail='updating timeline for %s' % session.twitter_id)

        if had_error:
            self._write_error(500)
            return

        had_updates, status_ids = result

        if had_updates:
            ping_hub([session.get_timeline_feed_url()])
        self.response.out.write(
            'Updated %s, %s updates' %
                (session.twitter_id, had_updates and 'had' or 'didn\'t have'))

        # If this update was triggered in response to a ping, see if we actually
        # got the status that we were looking for, otherwise we have to try
        # again.
        try:
            expected_status_id = long(self.request.get('expected_status_id'))
            update_retry_count = int(self.request.get('update_retry_count'))

            logging.info('Looking for expected status %d...' % expected_status_id)

            if expected_status_id in status_ids:
                logging.info('...found')
                return

            if update_retry_count == PING_UPDATE_RETRY_MAX:
                logging.info('...not found, and no retries left')
                return

            update_retry_count += 1

            logging.info('...not found, queuing the %d-th retry' /
                update_retry_count)

            session.enqueue_update_task(
                countdown=update_retry_count * PING_UPDATE_DELAY_SEC,
                expected_status_id=expected_status_id,
                update_retry_count=update_retry_count)
        except ValueError:
            # Ignore mising/invalid values
            return
dataset/ETHPy150Open mihaip/streamspigot/app/birdfeeder/handlers/update.py/UpdateTaskHandler.post/operator `%` -> `/`