mirror of
				https://github.com/zulip/zulip.git
				synced 2025-11-04 05:53:43 +00:00 
			
		
		
		
	Augment Tornado logging about failed user_profile loads.
(imported from commit 94fb3d6ce3eb8565b8c55eaf281a3ee7df6061f7)
This commit is contained in:
		@@ -103,13 +103,15 @@ def cache_load_message_data(message_id, users):
 | 
				
			|||||||
    for user_profile_id, user_profile in user_profiles.iteritems():
 | 
					    for user_profile_id, user_profile in user_profiles.iteritems():
 | 
				
			||||||
        if user_profile:
 | 
					        if user_profile:
 | 
				
			||||||
            continue
 | 
					            continue
 | 
				
			||||||
        if not settings.TEST_SUITE:
 | 
					 | 
				
			||||||
            logging.warning("Tornado failed to load user profile from memcached when delivering message!")
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
        user_profile = UserProfile.objects.select_related().get(id=user_profile_id)
 | 
					        user_profile = UserProfile.objects.select_related().get(id=user_profile_id)
 | 
				
			||||||
        user_profiles[user_profile_id] = user_profile
 | 
					        user_profiles[user_profile_id] = user_profile
 | 
				
			||||||
        cache_save_user_profile(user_profile)
 | 
					        cache_save_user_profile(user_profile)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        if not settings.TEST_SUITE:
 | 
				
			||||||
 | 
					            logging.warning("Tornado failed to load user profile %s from memcached when delivering message!" %
 | 
				
			||||||
 | 
					                            (user_profile.email,))
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    return message, user_profiles
 | 
					    return message, user_profiles
 | 
				
			||||||
 | 
					
 | 
				
			||||||
def receiver_is_idle(user_profile, realm_presences):
 | 
					def receiver_is_idle(user_profile, realm_presences):
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user