mirror of
				https://github.com/zulip/zulip.git
				synced 2025-11-04 05:53:43 +00:00 
			
		
		
		
	rate_limit: Adjust keys() of some RateLimitedObjects.
type().__name__ is sufficient, and much readable than type(), so it's better to use the former for keys. We also make the classes consistent in forming the keys in the format type(self).__name__:identifier and adjust logger.warning and statsd to take advantage of that and simply log the key().
This commit is contained in:
		
				
					committed by
					
						
						Tim Abbott
					
				
			
			
				
	
			
			
			
						parent
						
							2c6b1fd575
						
					
				
				
					commit
					4e9f77a6c4
				
			@@ -411,7 +411,8 @@ class WorkerTest(ZulipTestCase):
 | 
			
		||||
                    fake_client.queue.append(('email_mirror', data[0]))
 | 
			
		||||
                    worker.start()
 | 
			
		||||
                    self.assertEqual(mock_mirror_email.call_count, 4)
 | 
			
		||||
                    expected_warn = "Deadlock trying to incr_ratelimit for RateLimitedRealmMirror:zulip"
 | 
			
		||||
                    expected_warn = "Deadlock trying to incr_ratelimit for RateLimitedRealmMirror:%s" % (
 | 
			
		||||
                        realm.string_id,)
 | 
			
		||||
                    mock_warn.assert_called_with(expected_warn)
 | 
			
		||||
 | 
			
		||||
    def test_email_sending_worker_retries(self) -> None:
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user