@@ -53,7 +53,7 @@ def has_expired(username) -> bool:
53
53
# Expired, reset the expiry time
54
54
CachedContent ._timers [username ] = now + CachedContent ._cache_period
55
55
if has_expired :
56
- logger .info ("Content expired for '%s'" , username )
56
+ logger .debug ("Content expired for '%s'" , username )
57
57
return has_expired
58
58
59
59
@staticmethod
@@ -62,14 +62,14 @@ def get_content(username):
62
62
if username not in CachedContent ._content :
63
63
CachedContent ._content [username ] = set ()
64
64
content = CachedContent ._content [username ]
65
- logger .info ("Got content for '%s': %s" , username , content )
65
+ logger .debug ("Got content for '%s': %s" , username , content )
66
66
return content
67
67
68
68
@staticmethod
69
69
def set_content (username , content ) -> None :
70
70
with CachedContent ._cache_lock :
71
71
CachedContent ._content [username ] = content .copy ()
72
- logger .info ("Set content for '%s': %s" , username , content )
72
+ logger .debug ("Set content for '%s': %s" , username , content )
73
73
74
74
75
75
def get_remote_conn (force_error_display = False ) -> Optional [SSHConnector ]:
@@ -246,7 +246,6 @@ def _run_query_with_connector(self, conn, user):
246
246
247
247
def _get_proposals_for_user_from_ispyb (self , user ):
248
248
if CachedContent .has_expired (user .username ):
249
- logger .info ("Cache has expired for '%s'" , user .username )
250
249
PrometheusMetrics .new_proposal_cache_miss ()
251
250
if conn := get_configured_connector ():
252
251
logger .info ("Got a connector for '%s'" , user .username )
@@ -260,13 +259,11 @@ def _get_proposals_for_user_from_ispyb(self, user):
260
259
# Return what we have for the user. Public (open) proposals
261
260
# will be added to what we return if necessary.
262
261
cached_prop_ids = CachedContent .get_content (user .username )
263
- logger .debug (
264
- "Have %s cached Proposals for '%s': %s " ,
262
+ logger .info (
263
+ "Returning %s cached Proposals for '%s'" ,
265
264
len (cached_prop_ids ),
266
265
user .username ,
267
- cached_prop_ids ,
268
266
)
269
-
270
267
return cached_prop_ids
271
268
272
269
def _get_proposals_from_connector (self , user , conn ):
0 commit comments