Skip to content

Commit

Permalink
Reduce redis sample code.
Browse files Browse the repository at this point in the history
Change-Id: I67a7998d0b29b7b398fc12fe819b810d29867620
  • Loading branch information
Jon Wayne Parrott committed Nov 10, 2016
1 parent 8169d89 commit 838dcfc
Showing 1 changed file with 0 additions and 5 deletions.
5 changes: 0 additions & 5 deletions appengine/flexible/redis/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,12 +34,7 @@
# [START example]
@app.route('/')
def index():
# Set initial value if necessary
if not redis_client.get('counter'):
redis_client.set('counter', 0)

value = redis_client.incr('counter', 1)

return 'Value is {}'.format(value)
# [END example]

Expand Down

0 comments on commit 838dcfc

Please sign in to comment.