#NEWLINE# def get( self , namespace = 'default' ) : #NEWLINE# #INDENT# current_global_count = get_count ( 'counter' ) #NEWLINE# taskqueue . add ( url = '/tasks/counter' , params = { #NEWLINE# #INDENT# 'counter_name' : 'counter' , #NEWLINE# #UNINDENT# } ) #NEWLINE# previous_namespace = namespace_manager . get_namespace ( ) #NEWLINE# try : #NEWLINE# #INDENT# namespace_manager . set_namespace ( namespace ) #NEWLINE# current_namespace_count = get_count ( 'counter' ) #NEWLINE# taskqueue . add ( url = '/tasks/counter' , params = { #NEWLINE# #INDENT# 'counter_name' : 'counter' , #NEWLINE# #UNINDENT# } ) #NEWLINE# #UNINDENT# finally : #NEWLINE# #INDENT# namespace_manager . set_namespace ( previous_namespace ) #NEWLINE# #UNINDENT# self . response . write ( 'Counters will be updated asyncronously.Current values: Global: {}, Namespace {}: {}' . format ( current_global_count , namespace , current_namespace_count ) )