Certification Practice Exams with Real Test Questions & Answers

A news feed web service hosted on Google App gcp video

 ·  PT1H46M27S  ·  EN

solutions-architect-pro video for a news feed web service hosted on Google App Engine is experiencing issues under peak load. Users report seeing previously

Full Certification Question

A news feed web service hosted on Google App Engine is experiencing issues under peak load. Users report seeing previously viewed news articles, indicating a potential problem within the service's logic or its interaction with App Engine. Below is the code. What is the most likely cause of this issue? import news from flask import Flask, redirect, request from flask.ext.api import status from google.appengine.api import users app = Flask(__name__) sessions = {} @app.route("/") def homepage(): user = users.get_current_user() if not user: return "Invalid login", status.HTTP_401_UNAUTHORIZED if user not in sessions: sessions[user] = {"viewed": []} news_articles = news.get_new_news(user, sessions[user]["viewed"]) sessions[user]["viewed"] += [n["id"] for n in news_articles] return news.render(news_articles) if __name__ == "__main__": app.run()