#NEWLINE# def _sync_state( self ) : #NEWLINE# #INDENT# 'Synchronize the local distribution state from shared memory.\n        ' #NEWLINE# t = time . time ( ) #NEWLINE# if ( ( t - self . _state_last_synced ) < STATE_SYNC_INTERVAL ) : #NEWLINE# #INDENT# return #NEWLINE# #UNINDENT# sm_state = self . _sm . get ( config . BASE [ 'SHARED_MEM_PPDNS_STATE_KEY' ] ) #NEWLINE# if ( sm_state is None ) : #NEWLINE# #INDENT# return #NEWLINE# #UNINDENT# if ( self . _state_timestamp == sm_state [ 'timestamp' ] ) : #NEWLINE# #INDENT# return #NEWLINE# #UNINDENT# self . _state = sm_state #NEWLINE# self . _state_timestamp = self [ 'timestamp' ] #NEWLINE# self . _state_last_synced = t